Index: apps/action.h =================================================================== --- apps/action.h (revision 25894) +++ apps/action.h (working copy) @@ -239,6 +239,7 @@ ACTION_KBD_DOWN, ACTION_KBD_MORSE_INPUT, ACTION_KBD_MORSE_SELECT, + ACTION_KBD_MORSE_CASE_SWITCH, #ifdef HAVE_TOUCHSCREEN /* the following are helper actions for touchscreen targets, Index: apps/recorder/keyboard.c =================================================================== --- apps/recorder/keyboard.c (revision 25894) +++ apps/recorder/keyboard.c (working copy) @@ -148,6 +148,7 @@ #ifdef HAVE_MORSE_INPUT /* FIXME: We should put this to a configuration file. */ +static bool morse_uppercase = false; static const char *morse_alphabets = "abcdefghijklmnopqrstuvwxyz1234567890,.?-@ "; static const unsigned char morse_codes[] = { @@ -155,6 +156,12 @@ 0x06,0x0f,0x16,0x1d,0x0a,0x08,0x03,0x09,0x11,0x0b,0x19,0x1b,0x1c, 0x2f,0x27,0x23,0x21,0x20,0x30,0x38,0x3c,0x3e,0x3f, 0x73,0x55,0x4c,0x61,0x5a,0x80 }; + +int toupper(const int val) { + if (val >= 'a' && val <= 'z') + return val-32; + return val; +} #endif /* Loads a custom keyboard into memory @@ -573,6 +580,11 @@ state.morse_code |= 0x01; } break; + case ACTION_KBD_MORSE_CASE_SWITCH: + if (state.morse_mode) { + morse_uppercase = !morse_uppercase; + } + break; #endif /* HAVE_MORSE_INPUT */ case ACTION_KBD_SELECT: @@ -626,7 +638,8 @@ /* turn off hangul input */ state.hangul = false; - kbd_inschar(&state, morse_alphabets[j]); + kbd_inschar(&state, + morse_uppercase ? toupper(morse_alphabets[j]) : morse_alphabets[j]); } #endif /* HAVE_MORSE_INPUT */ break; @@ -862,6 +875,10 @@ int morse_code; outline[0] = morse_alphabets[i]; + + if (morse_uppercase) + outline[0] = toupper(outline[0]); + sc->putsxy(x, y, outline); morse_code = morse_codes[i]; Index: apps/keymaps/keymap-fuze.c =================================================================== --- apps/keymaps/keymap-fuze.c (revision 25894) +++ apps/keymaps/keymap-fuze.c (working copy) @@ -269,6 +269,7 @@ { ACTION_KBD_DONE, BUTTON_UP, BUTTON_NONE }, { ACTION_KBD_ABORT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, + { ACTION_KBD_MORSE_CASE_SWITCH, BUTTON_HOME, BUTTON_NONE }, LAST_ITEM_IN_LIST }; /* button_context_keyboard */