From 4bc61b62160d11199eccb00a169d3edc3b8764e2 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sun, 26 Nov 2017 13:31:30 -0800 Subject: [PATCH] Allow access to system soft touch keyboard from top right menu --- src/video/gltouchmenu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/video/gltouchmenu.c b/src/video/gltouchmenu.c index 2c7a440f..f6cc9f4e 100644 --- a/src/video/gltouchmenu.c +++ b/src/video/gltouchmenu.c @@ -123,7 +123,7 @@ static inline void _hide_top_left(void) { static inline void _show_top_right(void) { topMenuTemplate[0][MENU_TEMPLATE_COLS-2] = MOUSETEXT_LEFT; topMenuTemplate[0][MENU_TEMPLATE_COLS-1] = ICONTEXT_MENU_SPROUT; - topMenuTemplate[1][MENU_TEMPLATE_COLS-2] = ICONTEXT_NONACTIONABLE; + topMenuTemplate[1][MENU_TEMPLATE_COLS-2] = MOUSETEXT_CURSOR1; topMenuTemplate[1][MENU_TEMPLATE_COLS-1] = MOUSETEXT_CHECKMARK; menu.topRightShowing = true; _present_menu(menu.model); @@ -301,6 +301,14 @@ static int64_t _tap_menu_item(float x, float y) { prefs_save(); break; + case MOUSETEXT_CURSOR0: + case MOUSETEXT_CURSOR1: + LOG("showing system keyboard..."); + flags |= TOUCH_FLAGS_REQUEST_SYSTEM_KBD; + _hide_top_right(); + prefs_save(); + break; + case ICONTEXT_MENU_TOUCHJOY: LOG("switching to joystick ..."); flags |= TOUCH_FLAGS_INPUT_DEVICE_CHANGE;