shithub: puzzles

Download patch

ref: f5ac13c847083a0499a258829be9c666cee7b00b
parent: 768ef770a351ee1528e6e7923d3b3b00654401cb
author: Ben Harris <bjh21@bjh21.me.uk>
date: Mon Oct 24 19:19:56 EDT 2022

js: Add mapping for UI_REDO based on KeyboardEvent.key

--- a/emcc.c
+++ b/emcc.c
@@ -301,6 +301,8 @@
         keyevent = MOD_NUM_KEYPAD | '7';
     else if (!strnullcmp(key, "PageUp"))
         keyevent = MOD_NUM_KEYPAD | '9';
+    else if (shift && ctrl && (!strnullcmp(key, "Z") || !strnullcmp(key, "z")))
+        keyevent = UI_REDO;
     else if (key && (unsigned char)key[0] < 0x80 && key[1] == '\0')
         /* Key generating a single ASCII character. */
         keyevent = key[0];