Fixed bug 5012 - KaiOS keycodes support
authorSam Lantinga <slouken@libsdl.org>
Tue, 03 Mar 2020 17:56:33 -0800
changeset 1358532a52ab3133c
parent 13584 fcecab4713f7
child 13586 2f5e3f0be62c
Fixed bug 5012 - KaiOS keycodes support

pelya

KaiOS is an OS for feature phones, with numeric keypad and non-touch screen, and typically 512 Mb RAM and 4 Gb flash.
It is based on Firefox OS, all apps are made with HTML5 and Javascript. SDL can be cross-compiled using emscripten and packaged as native app.
This patch adds support for star '*' and pound '#' keys on such phones to generate SDL events.
src/video/emscripten/SDL_emscriptenevents.c
     1.1 --- a/src/video/emscripten/SDL_emscriptenevents.c	Tue Mar 03 09:22:43 2020 -0800
     1.2 +++ b/src/video/emscripten/SDL_emscriptenevents.c	Tue Mar 03 17:56:33 2020 -0800
     1.3 @@ -206,14 +206,14 @@
     1.4      /* 160 */   SDL_SCANCODE_UNKNOWN,
     1.5      /* 161 */   SDL_SCANCODE_UNKNOWN,
     1.6      /* 162 */   SDL_SCANCODE_UNKNOWN,
     1.7 -    /* 163 */   SDL_SCANCODE_UNKNOWN,
     1.8 +    /* 163 */   SDL_SCANCODE_KP_HASH, /*KaiOS phone keypad*/
     1.9      /* 164 */   SDL_SCANCODE_UNKNOWN,
    1.10      /* 165 */   SDL_SCANCODE_UNKNOWN,
    1.11      /* 166 */   SDL_SCANCODE_UNKNOWN,
    1.12      /* 167 */   SDL_SCANCODE_UNKNOWN,
    1.13      /* 168 */   SDL_SCANCODE_UNKNOWN,
    1.14      /* 169 */   SDL_SCANCODE_UNKNOWN,
    1.15 -    /* 170 */   SDL_SCANCODE_UNKNOWN,
    1.16 +    /* 170 */   SDL_SCANCODE_KP_MULTIPLY, /*KaiOS phone keypad*/
    1.17      /* 171 */   SDL_SCANCODE_UNKNOWN,
    1.18      /* 172 */   SDL_SCANCODE_UNKNOWN,
    1.19      /* 173 */   SDL_SCANCODE_MINUS, /*FX*/