mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
ad66c3b807
commit
7e428ad190
1 changed files with 11 additions and 0 deletions
|
@ -342,6 +342,13 @@ int kbd_input(char* text, int buflen, unsigned short *kbd)
|
||||||
viewportmanager_theme_enable(l, false, NULL);
|
viewportmanager_theme_enable(l, false, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_TOUCHSCREEN
|
||||||
|
/* 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);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* initialize state */
|
/* initialize state */
|
||||||
state.text = text;
|
state.text = text;
|
||||||
state.buflen = buflen;
|
state.buflen = buflen;
|
||||||
|
@ -680,6 +687,10 @@ int kbd_input(char* text, int buflen, unsigned short *kbd)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
splash(HZ/2, ID2P(LANG_CANCEL));
|
splash(HZ/2, ID2P(LANG_CANCEL));
|
||||||
|
|
||||||
|
#ifdef HAVE_TOUCHSCREEN
|
||||||
|
touchscreen_set_mode(old_mode);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_MORSE_INPUT) && defined(KBD_TOGGLE_INPUT)
|
#if defined(HAVE_MORSE_INPUT) && defined(KBD_TOGGLE_INPUT)
|
||||||
if (global_settings.morse_input != state.morse_mode)
|
if (global_settings.morse_input != state.morse_mode)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue