summaryrefslogtreecommitdiff
path: root/apps/recorder/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/keyboard.c')
-rw-r--r--apps/recorder/keyboard.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 1c9ba7bed4..c1bd25e0aa 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -33,6 +33,7 @@
33#define KEYBOARD_LINES 4 33#define KEYBOARD_LINES 4
34#define KEYBOARD_PAGES 3 34#define KEYBOARD_PAGES 3
35 35
36#ifdef HAVE_RECORDER_KEYPAD
36static void kbd_setupkeys(const char* line[KEYBOARD_LINES], int page) 37static void kbd_setupkeys(const char* line[KEYBOARD_LINES], int page)
37{ 38{
38 switch (page) { 39 switch (page) {
@@ -58,6 +59,7 @@ static void kbd_setupkeys(const char* line[KEYBOARD_LINES], int page)
58 break; 59 break;
59 } 60 }
60} 61}
62#endif
61 63
62/* helper function to spell a char if voice UI is enabled */ 64/* helper function to spell a char if voice UI is enabled */
63void kbd_spellchar(char c) 65void kbd_spellchar(char c)
@@ -75,6 +77,12 @@ void kbd_spellchar(char c)
75 77
76int kbd_input(char* text, int buflen) 78int kbd_input(char* text, int buflen)
77{ 79{
80#ifndef HAVE_RECORDER_KEYPAD
81 (void)text;
82 (void)buflen;
83 splash(HZ*2, true, "Keyboard not implemented yet");
84 return 0;
85#else
78 bool done = false; 86 bool done = false;
79 int page = 0; 87 int page = 0;
80 88
@@ -240,7 +248,6 @@ int kbd_input(char* text, int buflen)
240 kbd_spellchar(line[y][x]); 248 kbd_spellchar(line[y][x]);
241 break; 249 break;
242 250
243#if (BUTTON_UP != BUTTON_PLAY) /* FixMe, this is just to make the Ondio compile */
244 case BUTTON_UP: 251 case BUTTON_UP:
245 case BUTTON_UP | BUTTON_REPEAT: 252 case BUTTON_UP | BUTTON_REPEAT:
246 if (y) 253 if (y)
@@ -249,7 +256,7 @@ int kbd_input(char* text, int buflen)
249 y = KEYBOARD_LINES - 1; 256 y = KEYBOARD_LINES - 1;
250 kbd_spellchar(line[y][x]); 257 kbd_spellchar(line[y][x]);
251 break; 258 break;
252#endif 259
253 case BUTTON_F3: 260 case BUTTON_F3:
254 case BUTTON_F3 | BUTTON_REPEAT: 261 case BUTTON_F3 | BUTTON_REPEAT:
255 /* backspace */ 262 /* backspace */
@@ -326,5 +333,7 @@ int kbd_input(char* text, int buflen)
326 } 333 }
327 } 334 }
328 lcd_setfont(FONT_UI); 335 lcd_setfont(FONT_UI);
336
329 return 0; 337 return 0;
338#endif /* ONDIO */
330} 339}