diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-24 22:37:30 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-24 22:37:30 +0100 |
| commit | 0db5fb525bb58056caf9303d2ac159fc51c04e04 (patch) | |
| tree | 3c5c8e4f07ec9403732c92f285a9727220b0d89a | |
| parent | 9698732d659451d5f5216834f7eea0eba46a623e (diff) | |
| download | puzzles-0db5fb525bb58056caf9303d2ac159fc51c04e04.zip puzzles-0db5fb525bb58056caf9303d2ac159fc51c04e04.tar.gz puzzles-0db5fb525bb58056caf9303d2ac159fc51c04e04.tar.bz2 puzzles-0db5fb525bb58056caf9303d2ac159fc51c04e04.tar.xz | |
js: Remove the charCode argument from key()
It hasn't been used in a while.
| -rw-r--r-- | emcc.c | 2 | ||||
| -rw-r--r-- | emccpre.js | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -262,7 +262,7 @@ void mousemove(int x, int y, int buttons) /* * Keyboard handler called from JS. */ -void key(int keycode, int charcode, const char *key, const char *chr, +void key(int keycode, const char *key, const char *chr, bool shift, bool ctrl) { int keyevent = -1; @@ -311,10 +311,10 @@ function initPuzzle() { // the puzzle - so users of this puzzle collection in other media // can indulge their instinct to press ^R for redo, for example, // without accidentally reloading the page. - key = Module.cwrap('key', 'void', ['number', 'number', 'string', + key = Module.cwrap('key', 'void', ['number', 'string', 'string', 'number', 'number']); onscreen_canvas.onkeydown = function(event) { - key(event.keyCode, event.charCode, event.key, event.char, + key(event.keyCode, event.key, event.char, event.shiftKey ? 1 : 0, event.ctrlKey ? 1 : 0); event.preventDefault(); }; |