summaryrefslogtreecommitdiff
path: root/apps/recorder/keyboard.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-01-04 14:36:04 +0000
committerNils Wallménius <nils@rockbox.org>2007-01-04 14:36:04 +0000
commit8a71f1adfdb2612c5cf347b2fba05d60df144c1f (patch)
treec51fd11b20c1d7c4d19270bb03e97116539003ac /apps/recorder/keyboard.c
parent922c0d6d3357bcd36f0c695a19ee2ab3f20c52de (diff)
Enable Morse mode for virtual keyboard on h10 players and make it possible to enter line edit while in Morse mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11911 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/keyboard.c')
-rw-r--r--apps/recorder/keyboard.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 8e006117c8..9b4240b8ba 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -64,6 +64,7 @@
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define KBD_MODES /* iriver H10 uses 2 modes, picker and line edit */
+#define KBD_MORSE_INPUT
#endif
struct keyboard_parameters {
@@ -708,7 +709,7 @@ int kbd_input(char* text, int buflen)
break;
case ACTION_KBD_DOWN:
-#ifdef KBD_MORSE_INPUT
+#if defined KBD_MORSE_INPUT && !defined KBD_MODES
if (morse_mode)
break;
#endif
@@ -746,7 +747,7 @@ int kbd_input(char* text, int buflen)
break;
case ACTION_KBD_UP:
-#ifdef KBD_MORSE_INPUT
+#if defined KBD_MORSE_INPUT && !defined KBD_MODES
if (morse_mode)
break;
#endif
@@ -762,8 +763,13 @@ int kbd_input(char* text, int buflen)
#endif
FOR_NB_SCREENS(l)
{
+#ifdef KBD_MORSE_INPUT
+ if (param[l].y && !morse_mode)
+#else
if (param[l].y)
+#endif
param[l].y--;
+
else
#ifndef KBD_MODES
param[l].y = param[l].lines - 1;}
@@ -807,7 +813,11 @@ int kbd_input(char* text, int buflen)
else
char_screen = 0;
#ifdef KBD_MORSE_INPUT
+#ifdef KBD_MODES
+ if (morse_mode && !line_edit)
+#else
if (morse_mode)
+#endif
{
morse_tick = current_tick;
if (!morse_reading)