summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/sdl/key_to_touch-sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/sdl/key_to_touch-sdl.c')
-rw-r--r--firmware/target/hosted/sdl/key_to_touch-sdl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/target/hosted/sdl/key_to_touch-sdl.c b/firmware/target/hosted/sdl/key_to_touch-sdl.c
index 90518c7c7e..a63df18ff5 100644
--- a/firmware/target/hosted/sdl/key_to_touch-sdl.c
+++ b/firmware/target/hosted/sdl/key_to_touch-sdl.c
@@ -51,6 +51,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords)
51 } 51 }
52 } 52 }
53 break; 53 break;
54#ifndef CONFIG_PLATFORM
54 case SDLK_KP7: 55 case SDLK_KP7:
55 case SDLK_7: 56 case SDLK_7:
56 new_btn = BUTTON_TOPLEFT; 57 new_btn = BUTTON_TOPLEFT;
@@ -58,6 +59,9 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords)
58 case SDLK_KP8: 59 case SDLK_KP8:
59 case SDLK_8: 60 case SDLK_8:
60 case SDLK_UP: 61 case SDLK_UP:
62#ifdef HAVE_SCROLLWHEEL
63 case SDL_BUTTON_WHEELDOWN:
64#endif
61 new_btn = BUTTON_TOPMIDDLE; 65 new_btn = BUTTON_TOPMIDDLE;
62 break; 66 break;
63 case SDLK_KP9: 67 case SDLK_KP9:
@@ -71,6 +75,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords)
71 break; 75 break;
72 case SDLK_KP5: 76 case SDLK_KP5:
73 case SDLK_i: 77 case SDLK_i:
78 case SDL_BUTTON_MIDDLE:
74 new_btn = BUTTON_CENTER; 79 new_btn = BUTTON_CENTER;
75 break; 80 break;
76 case SDLK_KP6: 81 case SDLK_KP6:
@@ -84,6 +89,9 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords)
84 break; 89 break;
85 case SDLK_KP2: 90 case SDLK_KP2:
86 case SDLK_k: 91 case SDLK_k:
92#ifdef HAVE_SCROLLWHEEL
93 case SDL_BUTTON_WHEELDOWN:
94#endif
87 case SDLK_DOWN: 95 case SDLK_DOWN:
88 new_btn = BUTTON_BOTTOMMIDDLE; 96 new_btn = BUTTON_BOTTOMMIDDLE;
89 break; 97 break;
@@ -91,6 +99,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords)
91 case SDLK_l: 99 case SDLK_l:
92 new_btn = BUTTON_BOTTOMRIGHT; 100 new_btn = BUTTON_BOTTOMRIGHT;
93 break; 101 break;
102#endif
94 } 103 }
95 return new_btn; 104 return new_btn;
96} 105}