Skip to content

Commit 639a036

Browse files
authored
feat: add ThumbCluster keycodes and update layout configurations. Thi… (#385)
* feat: add ThumbCluster keycodes and update layout configurations. This is mainly for matrix layouts with letter in thumb cluster area. * added thumb cluster keys as potential character keys.
1 parent 4a47b6b commit 639a036

File tree

5 files changed

+32
-1
lines changed

5 files changed

+32
-1
lines changed

packages/keybr-keyboard-io/lib/keys.ts

+5
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,9 @@ export const characterKeys: readonly KeyId[] = [
6363
"IntlRo",
6464
// ---
6565
"Space",
66+
// --- Those are virtual keys mapped to physical keys by keyboard firmware.
67+
"ThumbClusterLeft1",
68+
"ThumbClusterLeft2",
69+
"ThumbClusterRight1",
70+
"ThumbClusterRight2",
6671
];

packages/keybr-keyboard/lib/geometry/matrix.ts

+20
Original file line numberDiff line numberDiff line change
@@ -266,4 +266,24 @@ export const MATRIX: GeometryDict = {
266266
labels: [{ text: "Shift" }],
267267
zones: ["pinky", "right", "bottom"],
268268
},
269+
ThumbClusterLeft1: {
270+
x: 4.5,
271+
y: 4,
272+
zones: ["thumb", "left", "bottom"],
273+
},
274+
ThumbClusterLeft2: {
275+
x: 5.5,
276+
y: 4,
277+
zones: ["thumb", "left", "bottom"],
278+
},
279+
ThumbClusterRight1: {
280+
x: 7.5,
281+
y: 4,
282+
zones: ["thumb", "right", "bottom"],
283+
},
284+
ThumbClusterRight2: {
285+
x: 8.5,
286+
y: 4,
287+
zones: ["thumb", "right", "bottom"],
288+
},
269289
};

packages/keybr-keyboard/lib/keycode.ts

+4
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,8 @@ export enum KeyCode {
262262
ScrollLock,
263263
/** Pause and Break */
264264
Pause,
265+
ThumbClusterLeft1,
266+
ThumbClusterLeft2,
267+
ThumbClusterRight1,
268+
ThumbClusterRight2,
265269
}

packages/keybr-keyboard/lib/layout.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ export class Layout implements XEnumItem {
10671067
/* name= */ "Hands Down Promethium (Matrix)",
10681068
/* family= */ "en-hands-down-promethium",
10691069
/* language= */ Language.EN,
1070-
/* emulate= */ true,
1070+
/* emulate= */ false,
10711071
/* geometries= */ new Enum(Geometry.MATRIX),
10721072
);
10731073

packages/keybr-keyboard/lib/layout/en_hands_down_promethium.ts

+2
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,6 @@ export const LAYOUT_EN_HANDS_DOWN_PROMETHIUM: CharacterDict = {
5252
Period: [/* EQUALS SIGN */ 0x003d, /* PLUS SIGN */ 0x002b],
5353
Slash: [/* SOLIDUS */ 0x002f, /* QUESTION MARK */ 0x003f],
5454
Space: [/* SPACE */ 0x0020],
55+
ThumbClusterLeft1: [/* LATIN SMALL LETTER R */ 0x0072, /* LATIN CAPITAL LETTER R */ 0x0052],
56+
ThumbClusterRight1: [/* SPACE */ 0x0020]
5557
};

0 commit comments

Comments
 (0)