diff options
| -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(); }; |