Commit 2a91f682b556ceac3e6f28705a8d2e66ee6a936c

Sam Lantinga 2020-03-03T17:56:33

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/video/emscripten/SDL_emscriptenevents.c b/src/video/emscripten/SDL_emscriptenevents.c
index 687c24e..14ebc17 100644
--- a/src/video/emscripten/SDL_emscriptenevents.c
+++ b/src/video/emscripten/SDL_emscriptenevents.c
@@ -206,14 +206,14 @@ static const SDL_Scancode emscripten_scancode_table[] = {
     /* 160 */   SDL_SCANCODE_UNKNOWN,
     /* 161 */   SDL_SCANCODE_UNKNOWN,
     /* 162 */   SDL_SCANCODE_UNKNOWN,
-    /* 163 */   SDL_SCANCODE_UNKNOWN,
+    /* 163 */   SDL_SCANCODE_KP_HASH, /*KaiOS phone keypad*/
     /* 164 */   SDL_SCANCODE_UNKNOWN,
     /* 165 */   SDL_SCANCODE_UNKNOWN,
     /* 166 */   SDL_SCANCODE_UNKNOWN,
     /* 167 */   SDL_SCANCODE_UNKNOWN,
     /* 168 */   SDL_SCANCODE_UNKNOWN,
     /* 169 */   SDL_SCANCODE_UNKNOWN,
-    /* 170 */   SDL_SCANCODE_UNKNOWN,
+    /* 170 */   SDL_SCANCODE_KP_MULTIPLY, /*KaiOS phone keypad*/
     /* 171 */   SDL_SCANCODE_UNKNOWN,
     /* 172 */   SDL_SCANCODE_UNKNOWN,
     /* 173 */   SDL_SCANCODE_MINUS, /*FX*/