Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replaced the way the alternate text is checked to be more perfor… #878

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 71 additions & 5 deletions src/api/hardware-dygma-defy-wired/components/Keymap.js

Large diffs are not rendered by default.

74 changes: 70 additions & 4 deletions src/api/hardware-dygma-defy-wireless/components/Keymap.js

Large diffs are not rendered by default.

72 changes: 68 additions & 4 deletions src/api/hardware-dygma-raise-ansi/components/Keymap-ANSI.js

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions src/api/hardware-dygma-raise-iso/components/Keymap-ISO.js

Large diffs are not rendered by default.

72 changes: 68 additions & 4 deletions src/api/hardware-dygma-raise2-ansi/components/Keymap-ANSI.js

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions src/api/hardware-dygma-raise2-iso/components/Keymap-ISO.js

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions src/api/hardware/Key.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={x} y={y} width={width + 6} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -244,7 +244,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={40} y={1} width={widthShape2 - 52} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
) : (
Expand Down Expand Up @@ -338,7 +338,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width - 52} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
) : (
Expand Down Expand Up @@ -442,7 +442,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={60}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
) : (
Expand Down Expand Up @@ -538,7 +538,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
) : (
Expand Down Expand Up @@ -634,7 +634,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -730,7 +730,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -827,7 +827,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -923,7 +923,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={12} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1019,7 +1019,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1115,7 +1115,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1211,7 +1211,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1307,7 +1307,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1403,7 +1403,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1499,7 +1499,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1595,7 +1595,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1691,7 +1691,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1787,7 +1787,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1883,7 +1883,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down Expand Up @@ -1979,7 +1979,7 @@ function Key(props: KeyShapeProps) {
</div>
</foreignObject>
<foreignObject x={0} y={1} width={width} height={height}>
<ListModifiersKey keyCode={keyCode} size="xs" />
<ListModifiersKey keyCode={keyCode} size="xs" selectedKey={selectedKey} />
</foreignObject>
</g>
</g>
Expand Down
1 change: 1 addition & 0 deletions src/api/keymap/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ class KeymapDB {
label: key.labels.primary,
extraLabel: key.labels.top,
verbose: key.labels.verbose,
alt: key.alt,
};
}

Expand Down
10 changes: 10 additions & 0 deletions src/api/keymap/db/digits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,60 +91,70 @@ const ShiftedDigitTable = {
labels: {
primary: "!",
},
alt: true,
},
{
code: 2079,
labels: {
primary: "@",
},
alt: true,
},
{
code: 2080,
labels: {
primary: "#",
},
alt: true,
},
{
code: 2081,
labels: {
primary: "$",
},
alt: true,
},
{
code: 2082,
labels: {
primary: "%",
},
alt: true,
},
{
code: 2083,
labels: {
primary: "^",
},
alt: true,
},
{
code: 2084,
labels: {
primary: "&",
},
alt: true,
},
{
code: 2085,
labels: {
primary: "*",
},
alt: true,
},
{
code: 2086,
labels: {
primary: "(",
},
alt: true,
},
{
code: 2087,
labels: {
primary: ")",
},
alt: true,
},
],
};
Expand Down
16 changes: 14 additions & 2 deletions src/api/keymap/db/punctuation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,73 +111,85 @@ const ShiftedPunctuationTable = {
labels: {
primary: "_",
},
alt: true,
},
{
code: 2094,
labels: {
primary: "+",
},
alt: true,
},
{
code: 2095,
labels: {
primary: "{",
},
alt: true,
},
{
code: 2096,
labels: {
primary: "}",
},
alt: true,
},
{
code: 2097,
labels: {
primary: "|",
},
alt: true,
},
{
code: 2099,
labels: {
primary: ":",
},
alt: true,
},
{
code: 2100,
labels: {
primary: '"',
},
alt: true,
},
{
code: 2101,
labels: {
primary: "~",
},
alt: true,
},
{
code: 2102,
labels: {
primary: "<",
},
alt: true,
},
{
code: 2103,
labels: {
primary: ">",
},
alt: true,
},
{
code: 2104,
labels: {
primary: "?",
},
alt: true,
},
{
code: 2148,
labels: {
primary: "Alt. |",
verbose: "Non-US |",
},
alt: true,
},
],
};
Expand Down Expand Up @@ -224,5 +236,5 @@ const ModifiedPunctuationTables = [
// All
withModifiers(PunctuationTable, "Hyper + AltGr +", "", 7936),
];

export { PunctuationTable as default, ModifiedPunctuationTables };
export default PunctuationTable;
export { ModifiedPunctuationTables };
Loading
Loading