diff options
author | Nils Wallménius <nils@rockbox.org> | 2007-01-04 14:36:04 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2007-01-04 14:36:04 +0000 |
commit | 8a71f1adfdb2612c5cf347b2fba05d60df144c1f (patch) | |
tree | c51fd11b20c1d7c4d19270bb03e97116539003ac /apps/recorder | |
parent | 922c0d6d3357bcd36f0c695a19ee2ab3f20c52de (diff) | |
download | rockbox-8a71f1adfdb2612c5cf347b2fba05d60df144c1f.tar.gz rockbox-8a71f1adfdb2612c5cf347b2fba05d60df144c1f.zip |
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')
-rw-r--r-- | apps/recorder/keyboard.c | 14 |
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 @@ | |||
64 | 64 | ||
65 | #elif CONFIG_KEYPAD == IRIVER_H10_PAD | 65 | #elif CONFIG_KEYPAD == IRIVER_H10_PAD |
66 | #define KBD_MODES /* iriver H10 uses 2 modes, picker and line edit */ | 66 | #define KBD_MODES /* iriver H10 uses 2 modes, picker and line edit */ |
67 | #define KBD_MORSE_INPUT | ||
67 | #endif | 68 | #endif |
68 | 69 | ||
69 | struct keyboard_parameters { | 70 | struct keyboard_parameters { |
@@ -708,7 +709,7 @@ int kbd_input(char* text, int buflen) | |||
708 | break; | 709 | break; |
709 | 710 | ||
710 | case ACTION_KBD_DOWN: | 711 | case ACTION_KBD_DOWN: |
711 | #ifdef KBD_MORSE_INPUT | 712 | #if defined KBD_MORSE_INPUT && !defined KBD_MODES |
712 | if (morse_mode) | 713 | if (morse_mode) |
713 | break; | 714 | break; |
714 | #endif | 715 | #endif |
@@ -746,7 +747,7 @@ int kbd_input(char* text, int buflen) | |||
746 | break; | 747 | break; |
747 | 748 | ||
748 | case ACTION_KBD_UP: | 749 | case ACTION_KBD_UP: |
749 | #ifdef KBD_MORSE_INPUT | 750 | #if defined KBD_MORSE_INPUT && !defined KBD_MODES |
750 | if (morse_mode) | 751 | if (morse_mode) |
751 | break; | 752 | break; |
752 | #endif | 753 | #endif |
@@ -762,8 +763,13 @@ int kbd_input(char* text, int buflen) | |||
762 | #endif | 763 | #endif |
763 | FOR_NB_SCREENS(l) | 764 | FOR_NB_SCREENS(l) |
764 | { | 765 | { |
766 | #ifdef KBD_MORSE_INPUT | ||
767 | if (param[l].y && !morse_mode) | ||
768 | #else | ||
765 | if (param[l].y) | 769 | if (param[l].y) |
770 | #endif | ||
766 | param[l].y--; | 771 | param[l].y--; |
772 | |||
767 | else | 773 | else |
768 | #ifndef KBD_MODES | 774 | #ifndef KBD_MODES |
769 | param[l].y = param[l].lines - 1;} | 775 | param[l].y = param[l].lines - 1;} |
@@ -807,7 +813,11 @@ int kbd_input(char* text, int buflen) | |||
807 | else | 813 | else |
808 | char_screen = 0; | 814 | char_screen = 0; |
809 | #ifdef KBD_MORSE_INPUT | 815 | #ifdef KBD_MORSE_INPUT |
816 | #ifdef KBD_MODES | ||
817 | if (morse_mode && !line_edit) | ||
818 | #else | ||
810 | if (morse_mode) | 819 | if (morse_mode) |
820 | #endif | ||
811 | { | 821 | { |
812 | morse_tick = current_tick; | 822 | morse_tick = current_tick; |
813 | if (!morse_reading) | 823 | if (!morse_reading) |