Skip to content

Commit 8a4aa01

Browse files
committed
enabled numpad enter and numpad add
1 parent 76c254f commit 8a4aa01

1 file changed

Lines changed: 2 additions & 28 deletions

File tree

demo/keyboard.ts

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -254,20 +254,7 @@ function numpad(ops: Op[], ctx: AppContext): void {
254254
ops.push(close());
255255

256256
// + spanning both rows
257-
ops.push(
258-
open("box", {
259-
layout: {
260-
width: fixed(6),
261-
height: grow(),
262-
padding: { left: 1, right: 1 },
263-
alignX: 2,
264-
alignY: 2,
265-
},
266-
bg: inactive,
267-
}),
268-
text("+", { color: label }),
269-
close(),
270-
);
257+
key(ops, { label: "+", match: is("NumpadAdd") }, ctx);
271258

272259
ops.push(close());
273260

@@ -292,20 +279,7 @@ function numpad(ops: Op[], ctx: AppContext): void {
292279
ops.push(close());
293280

294281
// Enter spanning both rows
295-
ops.push(
296-
open("box", {
297-
layout: {
298-
width: fixed(6),
299-
height: grow(),
300-
padding: { left: 1, right: 1 },
301-
alignX: 2,
302-
alignY: 2,
303-
},
304-
bg: inactive,
305-
}),
306-
text("Ent", { color: label }),
307-
close(),
308-
);
282+
key(ops, { label: "Ent", match: is("NumpadEnter") }, ctx);
309283

310284
ops.push(close());
311285

0 commit comments

Comments
 (0)