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.
This commit is contained in:
Ben Harris
2022-11-05 17:39:42 +00:00
parent ee5b02b0ca
commit 4fdcc54975

3
emcc.c
View File

@ -301,7 +301,8 @@ bool key(int keycode, const char *key, const char *chr, int location,
keyevent = CURSOR_RIGHT; keyevent = CURSOR_RIGHT;
else if (!strnullcmp(key, "ArrowDown") || !strnullcmp(key, "Down")) else if (!strnullcmp(key, "ArrowDown") || !strnullcmp(key, "Down"))
keyevent = CURSOR_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; keyevent = CURSOR_SELECT2;
else if (!strnullcmp(key, "End")) else if (!strnullcmp(key, "End"))
/* /*