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 | |
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')
-rw-r--r-- | apps/keymaps/keymap-h10.c | 7 | ||||
-rw-r--r-- | apps/recorder/keyboard.c | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/apps/keymaps/keymap-h10.c b/apps/keymaps/keymap-h10.c index 16c8c49258..904b8c0bbe 100644 --- a/apps/keymaps/keymap-h10.c +++ b/apps/keymaps/keymap-h10.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
7 | * \/ \/ \/ \/ \/ | 7 | * \/ \/ \/ \/ \/ |
8 | * $Id$ | ||
8 | * | 9 | * |
9 | * Copyright (C) Barry Wardell 2006 | 10 | * Copyright (C) Barry Wardell 2006 |
10 | * | 11 | * |
@@ -280,13 +281,15 @@ static const struct button_mapping button_context_keyboard[] = { | |||
280 | { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 281 | { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
281 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | 282 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, |
282 | { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 283 | { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, |
283 | { ACTION_KBD_SELECT, BUTTON_REW|BUTTON_REL, BUTTON_REW }, | 284 | { ACTION_KBD_SELECT, BUTTON_REW, BUTTON_NONE }, |
284 | { ACTION_KBD_DONE, BUTTON_PLAY, BUTTON_NONE }, | 285 | { ACTION_KBD_DONE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, |
285 | { ACTION_KBD_ABORT, BUTTON_FF, BUTTON_NONE }, | 286 | { ACTION_KBD_ABORT, BUTTON_FF, BUTTON_NONE }, |
286 | { ACTION_KBD_UP, BUTTON_SCROLL_UP, BUTTON_NONE }, | 287 | { ACTION_KBD_UP, BUTTON_SCROLL_UP, BUTTON_NONE }, |
287 | { ACTION_KBD_UP, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 288 | { ACTION_KBD_UP, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE }, |
288 | { ACTION_KBD_DOWN, BUTTON_SCROLL_DOWN, BUTTON_NONE }, | 289 | { ACTION_KBD_DOWN, BUTTON_SCROLL_DOWN, BUTTON_NONE }, |
289 | { ACTION_KBD_DOWN, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 290 | { ACTION_KBD_DOWN, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
291 | { ACTION_KBD_MORSE_INPUT, BUTTON_REW|BUTTON_PLAY, BUTTON_NONE }, | ||
292 | { ACTION_KBD_MORSE_SELECT, BUTTON_REW|BUTTON_REL, BUTTON_NONE }, | ||
290 | 293 | ||
291 | LAST_ITEM_IN_LIST | 294 | LAST_ITEM_IN_LIST |
292 | }; /* button_context_keyboard */ | 295 | }; /* button_context_keyboard */ |
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) |