summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl/button.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/button.c')
-rw-r--r--uisimulator/sdl/button.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 2a06f2e435..9f86cd8ed0 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -950,6 +950,36 @@ void button_event(int key, bool pressed)
case SDLK_SPACE:
new_btn = BUTTON_SELECT;
break;
+
+#elif CONFIG_KEYPAD == SANSA_CLIP_PAD
+ case SDLK_KP4:
+ case SDLK_LEFT:
+ new_btn = BUTTON_LEFT;
+ break;
+ case SDLK_KP6:
+ case SDLK_RIGHT:
+ new_btn = BUTTON_RIGHT;
+ break;
+ case SDLK_KP8:
+ case SDLK_UP:
+ new_btn = BUTTON_UP;
+ break;
+ case SDLK_KP2:
+ case SDLK_DOWN:
+ new_btn = BUTTON_DOWN;
+ break;
+ case SDLK_INSERT:
+ new_btn = BUTTON_HOME;
+ break;
+ case SDLK_SPACE:
+ new_btn = BUTTON_SELECT;
+ break;
+ case SDLK_PAGEDOWN:
+ new_btn = BUTTON_VOL_DOWN;
+ break;
+ case SDLK_PAGEUP:
+ new_btn = BUTTON_VOL_UP;
+ break;
#else
#error No keymap defined!
#endif /* CONFIG_KEYPAD */