js: Map the "SoftLeft" key to CURSOR_SELECT2

This is the left soft key on KaiOS phones.  The centre soft key
already sends "Enter", which eventually becomes CURSOR_SELECT.  The
right soft key I'm planning to use to open the menu.
This commit is contained in:
Ben Harris
2022-11-02 22:22:46 +00:00
parent ad9ee5a524
commit ee5b02b0ca

2
emcc.c
View File

@ -301,6 +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 */
keyevent = CURSOR_SELECT2;
else if (!strnullcmp(key, "End")) else if (!strnullcmp(key, "End"))
/* /*
* We interpret Home, End, PgUp and PgDn as numeric keypad * We interpret Home, End, PgUp and PgDn as numeric keypad