diff options
authorAidan MacDonald <>2021-08-26 20:50:52 +0100
committerAidan MacDonald <>2021-11-21 20:26:20 +0000
commit7e428ad190dd8d928fbb1451a7bb81dd4e856258 (patch)
parentad66c3b807245a8c0b4ea78e0c5d980d71726d89 (diff)
touchscreen: force 3x3 mode in the keyboard
In absolute pointing mode the keyboard is virtually unusable since the keys are too tiny (just 8x6). There are other issues too: for example putting the keys on top doesn't make sense on touchscreens and there is a lot of empty space in between keys that serves no real purpose. Until these issues can be addressed properly simply force 3x3 mode when in the keyboard. Change-Id: I3ea95ae479372f5b5f86ffcc2dbde10a03663820
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 9586385d3e..fd6099c8c6 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -342,6 +342,13 @@ int kbd_input(char* text, int buflen, unsigned short *kbd)
viewportmanager_theme_enable(l, false, NULL);
+ /* keyboard is unusuable in pointing mode so force 3x3 for now.
+ * TODO - fix properly by using a bigger font and changing the layout */
+ enum touchscreen_mode old_mode = touchscreen_get_mode();
+ touchscreen_set_mode(TOUCHSCREEN_BUTTON);
/* initialize state */
state.text = text;
state.buflen = buflen;
@@ -680,6 +687,10 @@ int kbd_input(char* text, int buflen, unsigned short *kbd)
if (ret < 0)
splash(HZ/2, ID2P(LANG_CANCEL));
+ touchscreen_set_mode(old_mode);
#if defined(HAVE_MORSE_INPUT) && defined(KBD_TOGGLE_INPUT)
if (global_settings.morse_input != state.morse_mode)