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

feat: add ThumbCluster keycodes and update layout configurations. Thi… #385

Merged
merged 2 commits into from
Feb 6, 2025
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
5 changes: 5 additions & 0 deletions packages/keybr-keyboard-io/lib/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,9 @@ export const characterKeys: readonly KeyId[] = [
"IntlRo",
// ---
"Space",
// --- Those are virtual keys mapped to physical keys by keyboard firmware.
"ThumbClusterLeft1",
"ThumbClusterLeft2",
"ThumbClusterRight1",
"ThumbClusterRight2",
];
20 changes: 20 additions & 0 deletions packages/keybr-keyboard/lib/geometry/matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,24 @@ export const MATRIX: GeometryDict = {
labels: [{ text: "Shift" }],
zones: ["pinky", "right", "bottom"],
},
ThumbClusterLeft1: {
x: 4.5,
y: 4,
zones: ["thumb", "left", "bottom"],
},
ThumbClusterLeft2: {
x: 5.5,
y: 4,
zones: ["thumb", "left", "bottom"],
},
ThumbClusterRight1: {
x: 7.5,
y: 4,
zones: ["thumb", "right", "bottom"],
},
ThumbClusterRight2: {
x: 8.5,
y: 4,
zones: ["thumb", "right", "bottom"],
},
};
4 changes: 4 additions & 0 deletions packages/keybr-keyboard/lib/keycode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,8 @@ export enum KeyCode {
ScrollLock,
/** Pause and Break */
Pause,
ThumbClusterLeft1,
ThumbClusterLeft2,
ThumbClusterRight1,
ThumbClusterRight2,
}
2 changes: 1 addition & 1 deletion packages/keybr-keyboard/lib/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ export class Layout implements XEnumItem {
/* name= */ "Hands Down Promethium (Matrix)",
/* family= */ "en-hands-down-promethium",
/* language= */ Language.EN,
/* emulate= */ true,
/* emulate= */ false,
/* geometries= */ new Enum(Geometry.MATRIX),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ export const LAYOUT_EN_HANDS_DOWN_PROMETHIUM: CharacterDict = {
Period: [/* EQUALS SIGN */ 0x003d, /* PLUS SIGN */ 0x002b],
Slash: [/* SOLIDUS */ 0x002f, /* QUESTION MARK */ 0x003f],
Space: [/* SPACE */ 0x0020],
ThumbClusterLeft1: [/* LATIN SMALL LETTER R */ 0x0072, /* LATIN CAPITAL LETTER R */ 0x0052],
ThumbClusterRight1: [/* SPACE */ 0x0020]
};