diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-05 17:39:42 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-08 10:27:19 +0000 |
| commit | 4fdcc5497503658324fda2e0073d830276b24b60 (patch) | |
| tree | a70f36a0c1dd51208c4bf9064efe1e630eb73dc4 | |
| parent | ee5b02b0ca11459a5fa5eddf94f0193e6dbf8706 (diff) | |
| download | puzzles-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.
| -rw-r--r-- | emcc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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")) /* |