diff options
-rw-r--r-- | src/shell/engine.js | 4 | ||||
-rw-r--r-- | src/wasm.zig | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/shell/engine.js b/src/shell/engine.js index 31371f8..6f6ffac 100644 --- a/src/shell/engine.js +++ b/src/shell/engine.js @@ -5,6 +5,10 @@ const createEngineCtx = (canvas) => { const specialKeymaps = { "Shift": 0xE000, + "ArrowUp": 0xE001, + "ArrowDown": 0xE002, + "ArrowLeft": 0xE003, + "ArrowRight": 0xE004, }; diff --git a/src/wasm.zig b/src/wasm.zig index b149d60..d0b0cc9 100644 --- a/src/wasm.zig +++ b/src/wasm.zig @@ -46,6 +46,10 @@ export fn mouseEvent( /// property is used for user text input, these values should be filtered out somehow. pub const SpecialKeyCodepoints = enum(u32) { shift = 0xE000, + arrow_up = 0xE001, + arrow_down = 0xE002, + arrow_left = 0xE003, + arrow_right = 0xE004, }; export fn keyEvent(codepoint: u32, is_press: bool, is_repeat: bool) void { |