aboutsummaryrefslogtreecommitdiff
path: root/emcc.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-11-05 17:39:42 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-11-08 10:27:19 +0000
commit4fdcc5497503658324fda2e0073d830276b24b60 (patch)
treea70f36a0c1dd51208c4bf9064efe1e630eb73dc4 /emcc.c
parentee5b02b0ca11459a5fa5eddf94f0193e6dbf8706 (diff)
downloadpuzzles-4fdcc5497503658324fda2e0073d830276b24b60.zip
puzzles-4fdcc5497503658324fda2e0073d830276b24b60.tar.gz
puzzles-4fdcc5497503658324fda2e0073d830276b24b60.tar.bz2
puzzles-4fdcc5497503658324fda2e0073d830276b24b60.tar.xz
js: Make SoftRight act as CURSOR_SELECT2 as well
This way, the front end can intercept one of SoftLeft and SoftRight as a menu key and leave the other one for the puzzle. And while we don't have a working menu, I can use whichever is more convenient.
Diffstat (limited to 'emcc.c')
-rw-r--r--emcc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/emcc.c b/emcc.c
index 02833df..c223b14 100644
--- a/emcc.c
+++ b/emcc.c
@@ -301,7 +301,8 @@ bool key(int keycode, const char *key, const char *chr, int location,
keyevent = CURSOR_RIGHT;
else if (!strnullcmp(key, "ArrowDown") || !strnullcmp(key, "Down"))
keyevent = CURSOR_DOWN;
- else if (!strnullcmp(key, "SoftLeft")) /* Left soft key on KaiOS */
+ else if (!strnullcmp(key, "SoftLeft") || !strnullcmp(key, "SoftRight"))
+ /* Left and right soft key on KaiOS. */
keyevent = CURSOR_SELECT2;
else if (!strnullcmp(key, "End"))
/*