shithub: puzzles

Download patch

ref: ebb7b4277e2440e66b65ac910a6af143bd2833d8
parent: 9bcb06ee305455d24ab22f4c8f3556213da1a1ee
author: Ben Harris <bjh21@bjh21.me.uk>
date: Sat Dec 10 14:05:11 EST 2022

js: Don't treat SoftRight as CURSOR_SELECT2

I was hoping that I could treat SoftLeft and SoftRight the same in C and
arrange to filter one of them out in JavaScript, but that turned out to
be impractical.

--- a/emcc.c
+++ b/emcc.c
@@ -317,8 +317,8 @@
         keyevent = CURSOR_RIGHT;
     else if (!strnullcmp(key, "ArrowDown") || !strnullcmp(key, "Down"))
         keyevent = CURSOR_DOWN;
-    else if (!strnullcmp(key, "SoftLeft") || !strnullcmp(key, "SoftRight"))
-        /* Left and right soft key on KaiOS. */
+    else if (!strnullcmp(key, "SoftLeft"))
+        /* Left soft key on KaiOS. */
         keyevent = CURSOR_SELECT2;
     else if (!strnullcmp(key, "End"))
         /*