summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/calendar.c4
-rw-r--r--apps/plugins/dict.c2
-rw-r--r--apps/plugins/frotz/frotz.c4
-rw-r--r--apps/plugins/goban/goban.c6
-rw-r--r--apps/plugins/keybox.c18
-rw-r--r--apps/plugins/lib/SOURCES2
-rw-r--r--apps/plugins/lib/kbd_helper.c63
-rw-r--r--apps/plugins/lib/kbd_helper.h27
-rw-r--r--apps/plugins/lrcplayer.c2
-rw-r--r--apps/plugins/lua/rocklib.c2
-rw-r--r--apps/plugins/otp.c19
-rw-r--r--apps/plugins/puzzles/rockbox.c2
-rw-r--r--apps/plugins/resistor.c6
-rw-r--r--apps/plugins/rockboy/menu.c2
-rw-r--r--apps/plugins/rockpaint.c4
-rw-r--r--apps/plugins/sdl/progs/duke3d/Game/src/console.c2
-rw-r--r--apps/plugins/sdl/progs/quake/keys.c2
-rw-r--r--apps/plugins/search.c2
-rw-r--r--apps/plugins/sokoban.c2
-rw-r--r--apps/plugins/splitedit.c4
-rw-r--r--apps/plugins/sudoku/sudoku.c2
-rw-r--r--apps/plugins/superdom.c2
-rw-r--r--apps/plugins/text_editor.c10
-rw-r--r--apps/plugins/zxbox/snapshot.c2
24 files changed, 142 insertions, 49 deletions
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index ded0a70d26..11a37191af 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -842,7 +842,7 @@ static void add_memo(struct shown *shown, int type)
842{ 842{
843 bool saved = false; 843 bool saved = false;
844 struct memo *memo = &memos[memos_in_memory]; 844 struct memo *memo = &memos[memos_in_memory];
845 if (rb->kbd_input(memo->message, MAX_CHAR_MEMO_LEN) == 0) 845 if (rb->kbd_input(memo->message, MAX_CHAR_MEMO_LEN, NULL) == 0)
846 { 846 {
847 if (memo->message[0]) 847 if (memo->message[0])
848 { 848 {
@@ -920,7 +920,7 @@ static bool edit_memo(int change, struct shown *shown)
920 920
921 case 1: /* edit */ 921 case 1: /* edit */
922 if(rb->kbd_input(memos[change].message, 922 if(rb->kbd_input(memos[change].message,
923 MAX_CHAR_MEMO_LEN) == 0) 923 MAX_CHAR_MEMO_LEN, NULL) == 0)
924 save_memo(change, true, shown); 924 save_memo(change, true, shown);
925 return false; 925 return false;
926 926
diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c
index 9438c1d022..c7868c09d0 100644
--- a/apps/plugins/dict.c
+++ b/apps/plugins/dict.c
@@ -92,7 +92,7 @@ enum plugin_status plugin_start(const void* parameter)
92 searchword[0] = '\0'; 92 searchword[0] = '\0';
93 93
94 /* get the word to search */ 94 /* get the word to search */
95 if (rb->kbd_input(searchword, sizeof(searchword)) < 0) 95 if (rb->kbd_input(searchword, sizeof(searchword), NULL) < 0)
96 return PLUGIN_OK; /* input cancelled */ 96 return PLUGIN_OK; /* input cancelled */
97 97
98 fIndex = rb->open(DICT_INDEX, O_RDONLY); /* index file */ 98 fIndex = rb->open(DICT_INDEX, O_RDONLY); /* index file */
diff --git a/apps/plugins/frotz/frotz.c b/apps/plugins/frotz/frotz.c
index 6dd6098e0b..4c12cfcd10 100644
--- a/apps/plugins/frotz/frotz.c
+++ b/apps/plugins/frotz/frotz.c
@@ -195,7 +195,7 @@ zchar os_read_key(int timeout, bool show_cursor)
195 return zkey; 195 return zkey;
196 196
197 inputbuf[0] = '\0'; 197 inputbuf[0] = '\0';
198 r = rb->kbd_input(inputbuf, 5); 198 r = rb->kbd_input(inputbuf, 5, NULL);
199 rb->lcd_setfont(FONT_SYSFIXED); 199 rb->lcd_setfont(FONT_SYSFIXED);
200 dumb_dump_screen(); 200 dumb_dump_screen();
201 if (!r) 201 if (!r)
@@ -226,7 +226,7 @@ zchar os_read_line(int max, zchar *buf, int timeout, int width, int continued)
226 if (max > width) 226 if (max > width)
227 max = width; 227 max = width;
228 strcpy(inputbuf, buf); 228 strcpy(inputbuf, buf);
229 r = rb->kbd_input(inputbuf, 256); 229 r = rb->kbd_input(inputbuf, 256, NULL);
230 rb->lcd_setfont(FONT_SYSFIXED); 230 rb->lcd_setfont(FONT_SYSFIXED);
231 dumb_dump_screen(); 231 dumb_dump_screen();
232 if (!r) 232 if (!r)
diff --git a/apps/plugins/goban/goban.c b/apps/plugins/goban/goban.c
index c20724ed70..7b378eebff 100644
--- a/apps/plugins/goban/goban.c
+++ b/apps/plugins/goban/goban.c
@@ -677,7 +677,7 @@ do_main_menu (void)
677 case MAIN_SAVE_AS: 677 case MAIN_SAVE_AS:
678 rb->strcpy (new_save_file, save_file); 678 rb->strcpy (new_save_file, save_file);
679 679
680 if (!rb->kbd_input (new_save_file, SAVE_FILE_LENGTH)) 680 if (!rb->kbd_input(new_save_file, SAVE_FILE_LENGTH, NULL))
681 { 681 {
682 break; 682 break;
683 } 683 }
@@ -921,7 +921,7 @@ do_gameinfo_menu (void)
921 break; 921 break;
922 } 922 }
923 923
924 rb->kbd_input (gameinfo_string, gameinfo_string_size); 924 rb->kbd_input(gameinfo_string, gameinfo_string_size, NULL);
925 sanitize_string (gameinfo_string); 925 sanitize_string (gameinfo_string);
926 set_game_modified(); 926 set_game_modified();
927 break; 927 break;
@@ -1191,7 +1191,7 @@ do_comment_edit (void)
1191 return false; 1191 return false;
1192 } 1192 }
1193 1193
1194 if (!rb->kbd_input (cbuffer, sizeof (cbuffer))) 1194 if (!rb->kbd_input (cbuffer, sizeof (cbuffer), NULL))
1195 { 1195 {
1196 /* user didn't edit, no reason to write it back */ 1196 /* user didn't edit, no reason to write it back */
1197 return true; 1197 return true;
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c
index 914761e73b..1689321abe 100644
--- a/apps/plugins/keybox.c
+++ b/apps/plugins/keybox.c
@@ -196,12 +196,12 @@ static void add_entry(int selected_item)
196 196
197 rb->splash(HZ, "Enter title"); 197 rb->splash(HZ, "Enter title");
198 pw_list.entries[i].title[0] = '\0'; 198 pw_list.entries[i].title[0] = '\0';
199 if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN) < 0) 199 if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN, NULL) < 0)
200 return; 200 return;
201 201
202 rb->splash(HZ, "Enter name"); 202 rb->splash(HZ, "Enter name");
203 pw_list.entries[i].name[0] = '\0'; 203 pw_list.entries[i].name[0] = '\0';
204 if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN) < 0) 204 if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN, NULL) < 0)
205 { 205 {
206 pw_list.entries[i].title[0] = '\0'; 206 pw_list.entries[i].title[0] = '\0';
207 return; 207 return;
@@ -209,7 +209,7 @@ static void add_entry(int selected_item)
209 209
210 rb->splash(HZ, "Enter password"); 210 rb->splash(HZ, "Enter password");
211 pw_list.entries[i].password[0] = '\0'; 211 pw_list.entries[i].password[0] = '\0';
212 if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN) < 0) 212 if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN, NULL) < 0)
213 { 213 {
214 pw_list.entries[i].title[0] = '\0'; 214 pw_list.entries[i].title[0] = '\0';
215 pw_list.entries[i].name[0] = '\0'; 215 pw_list.entries[i].name[0] = '\0';
@@ -244,7 +244,7 @@ static void edit_title(int selected_item)
244 if (entry->next) 244 if (entry->next)
245 entry = entry->next; 245 entry = entry->next;
246 } 246 }
247 if (rb->kbd_input(entry->title, FIELD_LEN) == 0) 247 if (rb->kbd_input(entry->title, FIELD_LEN, NULL) == 0)
248 data_changed = true; 248 data_changed = true;
249} 249}
250 250
@@ -257,7 +257,7 @@ static void edit_name(int selected_item)
257 if (entry->next) 257 if (entry->next)
258 entry = entry->next; 258 entry = entry->next;
259 } 259 }
260 if (rb->kbd_input(entry->name, FIELD_LEN) == 0) 260 if (rb->kbd_input(entry->name, FIELD_LEN, NULL) == 0)
261 data_changed = true; 261 data_changed = true;
262} 262}
263 263
@@ -270,7 +270,7 @@ static void edit_pw(int selected_item)
270 if (entry->next) 270 if (entry->next)
271 entry = entry->next; 271 entry = entry->next;
272 } 272 }
273 if (rb->kbd_input(entry->password, FIELD_LEN) == 0) 273 if (rb->kbd_input(entry->password, FIELD_LEN, NULL) == 0)
274 data_changed = true; 274 data_changed = true;
275} 275}
276 276
@@ -513,11 +513,11 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw)
513 if (new_pw) 513 if (new_pw)
514 { 514 {
515 rb->splash(HZ, "Enter new master password"); 515 rb->splash(HZ, "Enter new master password");
516 if (rb->kbd_input(buf[0], sizeof(buf[0])) < 0) 516 if (rb->kbd_input(buf[0], sizeof(buf[0]), NULL) < 0)
517 return -1; 517 return -1;
518 518
519 rb->splash(HZ, "Confirm master password"); 519 rb->splash(HZ, "Confirm master password");
520 if (rb->kbd_input(buf[1], sizeof(buf[1])) < 0) 520 if (rb->kbd_input(buf[1], sizeof(buf[1]), NULL) < 0)
521 return -1; 521 return -1;
522 522
523 if (rb->strcmp(buf[0], buf[1])) 523 if (rb->strcmp(buf[0], buf[1]))
@@ -534,7 +534,7 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw)
534 } 534 }
535 535
536 rb->splash(HZ, "Enter master password"); 536 rb->splash(HZ, "Enter master password");
537 if (rb->kbd_input(pw_buf, buflen) < 0) 537 if (rb->kbd_input(pw_buf, buflen, NULL) < 0)
538 return -1; 538 return -1;
539 hash_pw(&pwhash); 539 hash_pw(&pwhash);
540 return 0; 540 return 0;
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES
index 9a7aef51d0..1149f35bac 100644
--- a/apps/plugins/lib/SOURCES
+++ b/apps/plugins/lib/SOURCES
@@ -69,6 +69,8 @@ bmp_smooth_scale.c
69pluginlib_albumart.c 69pluginlib_albumart.c
70#endif 70#endif
71 71
72kbd_helper.c
73
72#endif /* HAVE_LCD_BITMAP */ 74#endif /* HAVE_LCD_BITMAP */
73 75
74#ifdef HAVE_TOUCHSCREEN 76#ifdef HAVE_TOUCHSCREEN
diff --git a/apps/plugins/lib/kbd_helper.c b/apps/plugins/lib/kbd_helper.c
new file mode 100644
index 0000000000..00191c3532
--- /dev/null
+++ b/apps/plugins/lib/kbd_helper.c
@@ -0,0 +1,63 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2020 William Wilgus
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include "plugin.h"
22#include "kbd_helper.h"
23
24/* USAGE:
25 unsigned short kbd[64];
26 unsigned short *kbd_p = kbd;
27 if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
28 kbd_p = NULL;
29
30 rb->kbd_input(buf,sizeof(buf), kbd_p);
31*/
32
33/* create a custom keyboard layout for kbd_input
34 * success returns size of buffer used
35 * failure returns 0
36*/
37int kbd_create_layout(char *layout, unsigned short *buf, int bufsz)
38{
39 unsigned short *pbuf;
40 const unsigned char *p = layout;
41 int len = 0;
42 pbuf = buf;
43 while (*p && (pbuf - buf + 8) < bufsz)
44 {
45 p = rb->utf8decode(p, &pbuf[len+1]);
46 if (pbuf[len+1] == '\n')
47 {
48 *pbuf = len;
49 pbuf += len+1;
50 len = 0;
51 }
52 else
53 len++;
54 }
55
56 if (len+1 < bufsz)
57 {
58 *pbuf = len;
59 pbuf[len+1] = 0xFEFF; /* mark end of characters */
60 return len + 1;
61 }
62 return 0;
63}
diff --git a/apps/plugins/lib/kbd_helper.h b/apps/plugins/lib/kbd_helper.h
new file mode 100644
index 0000000000..90443cbf3f
--- /dev/null
+++ b/apps/plugins/lib/kbd_helper.h
@@ -0,0 +1,27 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2020 William Wilgus
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#ifndef KBD_HELPER_H
22#define KBD_HELPER_H
23
24/* create a custom keyboard layout for kbd_input */
25int kbd_create_layout(char *layout, unsigned short *buf, int bufsz);
26
27#endif /* KBD_HELPER_H */
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c
index c7f36968a1..4ae9722ae3 100644
--- a/apps/plugins/lrcplayer.c
+++ b/apps/plugins/lrcplayer.c
@@ -2475,7 +2475,7 @@ static bool lrc_lyrics_menu(void)
2475#endif 2475#endif
2476 case LRC_MENU_LRC_DIR: 2476 case LRC_MENU_LRC_DIR:
2477 rb->strcpy(temp_buf, prefs.lrc_directory); 2477 rb->strcpy(temp_buf, prefs.lrc_directory);
2478 if (!rb->kbd_input(temp_buf, sizeof(prefs.lrc_directory))) 2478 if (!rb->kbd_input(temp_buf, sizeof(prefs.lrc_directory), NULL))
2479 rb->strcpy(prefs.lrc_directory, temp_buf); 2479 rb->strcpy(prefs.lrc_directory, temp_buf);
2480 break; 2480 break;
2481 case MENU_ATTACHED_USB: 2481 case MENU_ATTACHED_USB:
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 6820c30dc3..a33fdf7170 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -152,7 +152,7 @@ RB_WRAP(kbd_input)
152 else 152 else
153 buffer[0] = '\0'; 153 buffer[0] = '\0';
154 154
155 if(!rb->kbd_input(buffer, LUAL_BUFFERSIZE)) 155 if(!rb->kbd_input(buffer, LUAL_BUFFERSIZE, NULL))
156 { 156 {
157 luaL_addstring(&b, buffer); 157 luaL_addstring(&b, buffer);
158 luaL_pushresult(&b); 158 luaL_pushresult(&b);
diff --git a/apps/plugins/otp.c b/apps/plugins/otp.c
index 6dece4ad38..2da1ef83f5 100644
--- a/apps/plugins/otp.c
+++ b/apps/plugins/otp.c
@@ -411,10 +411,11 @@ static void add_acct_manual(void)
411 memset(accounts + next_slot, 0, sizeof(struct account_t)); 411 memset(accounts + next_slot, 0, sizeof(struct account_t));
412 412
413 rb->splash(HZ * 1, "Enter account name."); 413 rb->splash(HZ * 1, "Enter account name.");
414 if(rb->kbd_input(accounts[next_slot].name, sizeof(accounts[next_slot].name)) < 0) 414 char* buf = accounts[next_slot].name;
415 if(rb->kbd_input(buf, sizeof(accounts[next_slot].name), NULL) < 0)
415 return; 416 return;
416 417
417 if(acct_exists(accounts[next_slot].name)) 418 if(acct_exists(buf))
418 { 419 {
419 rb->splash(HZ * 2, "Duplicate account name!"); 420 rb->splash(HZ * 2, "Duplicate account name!");
420 return; 421 return;
@@ -425,7 +426,7 @@ static void add_acct_manual(void)
425 char temp_buf[SECRET_MAX * 2]; 426 char temp_buf[SECRET_MAX * 2];
426 memset(temp_buf, 0, sizeof(temp_buf)); 427 memset(temp_buf, 0, sizeof(temp_buf));
427 428
428 if(rb->kbd_input(temp_buf, sizeof(temp_buf)) < 0) 429 if(rb->kbd_input(temp_buf, sizeof(temp_buf), NULL) < 0)
429 return; 430 return;
430 431
431 if((accounts[next_slot].sec_len = base32_decode(accounts[next_slot].secret, SECRET_MAX, temp_buf)) <= 0) 432 if((accounts[next_slot].sec_len = base32_decode(accounts[next_slot].secret, SECRET_MAX, temp_buf)) <= 0)
@@ -457,7 +458,7 @@ static void add_acct_manual(void)
457 temp_buf[1] = '0'; 458 temp_buf[1] = '0';
458 } 459 }
459 460
460 if(rb->kbd_input(temp_buf, sizeof(temp_buf)) < 0) 461 if(rb->kbd_input(temp_buf, sizeof(temp_buf), NULL) < 0)
461 return; 462 return;
462 463
463 if(!accounts[next_slot].is_totp) 464 if(!accounts[next_slot].is_totp)
@@ -470,7 +471,7 @@ static void add_acct_manual(void)
470 memset(temp_buf, 0, sizeof(temp_buf)); 471 memset(temp_buf, 0, sizeof(temp_buf));
471 temp_buf[0] = '6'; 472 temp_buf[0] = '6';
472 473
473 if(rb->kbd_input(temp_buf, sizeof(temp_buf)) < 0) 474 if(rb->kbd_input(temp_buf, sizeof(temp_buf), NULL) < 0)
474 return; 475 return;
475 476
476 accounts[next_slot].digits = rb->atoi(temp_buf); 477 accounts[next_slot].digits = rb->atoi(temp_buf);
@@ -667,7 +668,7 @@ static void edit_menu(int acct)
667 case 0: // rename 668 case 0: // rename
668 rb->splash(HZ, "Enter new name."); 669 rb->splash(HZ, "Enter new name.");
669 rb->strlcpy(data_buf, accounts[acct].name, sizeof(data_buf)); 670 rb->strlcpy(data_buf, accounts[acct].name, sizeof(data_buf));
670 if(rb->kbd_input(data_buf, sizeof(data_buf)) < 0) 671 if(rb->kbd_input(data_buf, sizeof(data_buf), NULL) < 0)
671 break; 672 break;
672 if(acct_exists(data_buf)) 673 if(acct_exists(data_buf))
673 { 674 {
@@ -695,7 +696,7 @@ static void edit_menu(int acct)
695 else 696 else
696 rb->snprintf(data_buf, sizeof(data_buf), "%d", accounts[acct].totp_period); 697 rb->snprintf(data_buf, sizeof(data_buf), "%d", accounts[acct].totp_period);
697 698
698 if(rb->kbd_input(data_buf, sizeof(data_buf)) < 0) 699 if(rb->kbd_input(data_buf, sizeof(data_buf), NULL) < 0)
699 break; 700 break;
700 701
701 if(accounts[acct].is_totp) 702 if(accounts[acct].is_totp)
@@ -709,7 +710,7 @@ static void edit_menu(int acct)
709 break; 710 break;
710 case 3: // digits 711 case 3: // digits
711 rb->snprintf(data_buf, sizeof(data_buf), "%d", accounts[acct].digits); 712 rb->snprintf(data_buf, sizeof(data_buf), "%d", accounts[acct].digits);
712 if(rb->kbd_input(data_buf, sizeof(data_buf)) < 0) 713 if(rb->kbd_input(data_buf, sizeof(data_buf), NULL) < 0)
713 break; 714 break;
714 715
715 accounts[acct].digits = rb->atoi(data_buf); 716 accounts[acct].digits = rb->atoi(data_buf);
@@ -722,7 +723,7 @@ static void edit_menu(int acct)
722 memcpy(temp_sec, accounts[acct].secret, accounts[acct].sec_len); 723 memcpy(temp_sec, accounts[acct].secret, accounts[acct].sec_len);
723 base32_encode(accounts[acct].secret, accounts[acct].sec_len, data_buf, sizeof(data_buf)); 724 base32_encode(accounts[acct].secret, accounts[acct].sec_len, data_buf, sizeof(data_buf));
724 725
725 if(rb->kbd_input(data_buf, sizeof(data_buf)) < 0) 726 if(rb->kbd_input(data_buf, sizeof(data_buf), NULL) < 0)
726 break; 727 break;
727 728
728 int ret = base32_decode(accounts[acct].secret, sizeof(accounts[acct].secret), data_buf); 729 int ret = base32_decode(accounts[acct].secret, sizeof(accounts[acct].secret), data_buf);
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c
index 3bae2e1e64..daeca3ccd7 100644
--- a/apps/plugins/puzzles/rockbox.c
+++ b/apps/plugins/puzzles/rockbox.c
@@ -2411,7 +2411,7 @@ static bool do_configure_item(config_item *cfgs, int idx)
2411 } 2411 }
2412 2412
2413 rb->strlcpy(newstr, cfg->u.string.sval, MAX_STRLEN); 2413 rb->strlcpy(newstr, cfg->u.string.sval, MAX_STRLEN);
2414 if(rb->kbd_input(newstr, MAX_STRLEN) < 0) 2414 if(rb->kbd_input(newstr, MAX_STRLEN, NULL) < 0)
2415 { 2415 {
2416 sfree(newstr); 2416 sfree(newstr);
2417 return false; 2417 return false;
diff --git a/apps/plugins/resistor.c b/apps/plugins/resistor.c
index 16374b3d18..ec6a364f23 100644
--- a/apps/plugins/resistor.c
+++ b/apps/plugins/resistor.c
@@ -623,7 +623,7 @@ static void led_resistance_calc(void)
623 623
624 rb->splash(HZ*2, "(First) Input the supply voltage:"); 624 rb->splash(HZ*2, "(First) Input the supply voltage:");
625 memset(kbd_buffer,0,sizeof(kbd_buffer)); 625 memset(kbd_buffer,0,sizeof(kbd_buffer));
626 rb->kbd_input(kbd_buffer, sizeof(kbd_buffer)); 626 rb->kbd_input(kbd_buffer, sizeof(kbd_buffer), NULL);
627 input_voltage = rb->atoi(kbd_buffer); 627 input_voltage = rb->atoi(kbd_buffer);
628 if(input_voltage == 0) break; 628 if(input_voltage == 0) break;
629 629
@@ -660,7 +660,7 @@ static void led_resistance_calc(void)
660 rb->lcd_clear_display(); 660 rb->lcd_clear_display();
661 rb->splash(HZ*2, "Input the foreward current, in mA"); 661 rb->splash(HZ*2, "Input the foreward current, in mA");
662 memset(fwd_kbd_buffer,0,sizeof(fwd_kbd_buffer)); 662 memset(fwd_kbd_buffer,0,sizeof(fwd_kbd_buffer));
663 rb->kbd_input(fwd_kbd_buffer, sizeof(fwd_kbd_buffer)); 663 rb->kbd_input(fwd_kbd_buffer, sizeof(fwd_kbd_buffer), NULL);
664 foreward_current = ((rb->atoi(fwd_kbd_buffer))/10); 664 foreward_current = ((rb->atoi(fwd_kbd_buffer))/10);
665 break; 665 break;
666 } 666 }
@@ -817,7 +817,7 @@ static void resistance_to_color(void)
817 NULL, false); 817 NULL, false);
818 if(ret<0) break; 818 if(ret<0) break;
819 819
820 rb->kbd_input(kbd_buffer, sizeof(kbd_buffer)); 820 rb->kbd_input(kbd_buffer, sizeof(kbd_buffer), NULL);
821 /* As stated above somewhere, we (I) need to make a calculator-like 821 /* As stated above somewhere, we (I) need to make a calculator-like
822 keypad, that keyboard isn't all that fun to use. */ 822 keypad, that keyboard isn't all that fun to use. */
823 ret = rb->do_menu(&r_to_c_menu_tol, &menu_selection_tol, 823 ret = rb->do_menu(&r_to_c_menu_tol, &menu_selection_tol,
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c
index 3cd231c06c..caa8d499cb 100644
--- a/apps/plugins/rockboy/menu.c
+++ b/apps/plugins/rockboy/menu.c
@@ -276,7 +276,7 @@ static bool do_slot(int slot_id, bool is_load) {
276 if (!is_load) 276 if (!is_load)
277 { 277 {
278 slot_info(desc_buf, sizeof(desc_buf), slot_id, false); 278 slot_info(desc_buf, sizeof(desc_buf), slot_id, false);
279 if ( rb->kbd_input(desc_buf, sizeof(desc_buf)) < 0 ) 279 if ( rb->kbd_input(desc_buf, sizeof(desc_buf), NULL) < 0 )
280 return false; 280 return false;
281 if ( !strlen(desc_buf) ) 281 if ( !strlen(desc_buf) )
282 strlcpy(desc_buf, "Untitled", sizeof(desc_buf)); 282 strlcpy(desc_buf, "Untitled", sizeof(desc_buf));
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c
index 3759489fe1..35d2f21ba7 100644
--- a/apps/plugins/rockpaint.c
+++ b/apps/plugins/rockpaint.c
@@ -1794,7 +1794,7 @@ static void draw_text( int x, int y )
1794 { 1794 {
1795 case TEXT_MENU_TEXT: 1795 case TEXT_MENU_TEXT:
1796 rb->lcd_set_foreground(COLOR_BLACK); 1796 rb->lcd_set_foreground(COLOR_BLACK);
1797 rb->kbd_input( buffer->text.text, MAX_TEXT ); 1797 rb->kbd_input( buffer->text.text, MAX_TEXT, NULL );
1798 break; 1798 break;
1799 1799
1800 case TEXT_MENU_FONT: 1800 case TEXT_MENU_FONT:
@@ -2790,7 +2790,7 @@ static void goto_menu(void)
2790 rb->lcd_set_foreground(COLOR_BLACK); 2790 rb->lcd_set_foreground(COLOR_BLACK);
2791 if (!filename[0]) 2791 if (!filename[0])
2792 rb->strcpy(filename,"/"); 2792 rb->strcpy(filename,"/");
2793 if( !rb->kbd_input( filename, MAX_PATH ) ) 2793 if( !rb->kbd_input( filename, MAX_PATH, NULL ) )
2794 { 2794 {
2795 if( !check_extention( filename, ".bmp" ) ) 2795 if( !check_extention( filename, ".bmp" ) )
2796 rb->strcat(filename, ".bmp"); 2796 rb->strcat(filename, ".bmp");
diff --git a/apps/plugins/sdl/progs/duke3d/Game/src/console.c b/apps/plugins/sdl/progs/duke3d/Game/src/console.c
index c4a465eda3..47135f85f1 100644
--- a/apps/plugins/sdl/progs/duke3d/Game/src/console.c
+++ b/apps/plugins/sdl/progs/duke3d/Game/src/console.c
@@ -224,7 +224,7 @@ void CONSOLE_HandleInput()
224 //If console_buffer[0] strlen() != 0 224 //If console_buffer[0] strlen() != 0
225 //1. Push the dirty_buffer unto the console_buffer 225 //1. Push the dirty_buffer unto the console_buffer
226 //2. parse the text 226 //2. parse the text
227 rb->kbd_input(dirty_buffer, sizeof(dirty_buffer)); 227 rb->kbd_input(dirty_buffer, sizeof(dirty_buffer), NULL);
228 228
229 CONSOLE_Printf("%s", dirty_buffer); 229 CONSOLE_Printf("%s", dirty_buffer);
230 console_cursor_pos = 0; 230 console_cursor_pos = 0;
diff --git a/apps/plugins/sdl/progs/quake/keys.c b/apps/plugins/sdl/progs/quake/keys.c
index 896bbaa795..e1285080a8 100644
--- a/apps/plugins/sdl/progs/quake/keys.c
+++ b/apps/plugins/sdl/progs/quake/keys.c
@@ -151,7 +151,7 @@ keyname_t keynames[] =
151/* Rockbox hack */ 151/* Rockbox hack */
152void rb_console(void) 152void rb_console(void)
153{ 153{
154 rb->kbd_input(key_lines[edit_line] + 1, MAXCMDLINE-1); 154 rb->kbd_input(key_lines[edit_line] + 1, MAXCMDLINE-1, NULL);
155} 155}
156 156
157/* 157/*
diff --git a/apps/plugins/search.c b/apps/plugins/search.c
index 831fe70cd4..ff7be343f6 100644
--- a/apps/plugins/search.c
+++ b/apps/plugins/search.c
@@ -111,7 +111,7 @@ static void clear_display(void){
111static bool search_init(const char* file){ 111static bool search_init(const char* file){
112 rb->memset(search_string, 0, sizeof(search_string)); 112 rb->memset(search_string, 0, sizeof(search_string));
113 113
114 if (!rb->kbd_input(search_string,sizeof search_string)){ 114 if (!rb->kbd_input(search_string,sizeof(search_string), NULL)){
115 clear_display(); 115 clear_display();
116 rb->splash(0, "Searching..."); 116 rb->splash(0, "Searching...");
117 fd = rb->open_utf8(file, O_RDONLY); 117 fd = rb->open_utf8(file, O_RDONLY);
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index e4c34930b1..62812e0237 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -1963,7 +1963,7 @@ static bool sokoban_loop(void)
1963 *loc = '.'; 1963 *loc = '.';
1964 } 1964 }
1965 1965
1966 if (!rb->kbd_input(buf, MAX_PATH)) 1966 if (!rb->kbd_input(buf, MAX_PATH, NULL))
1967 save(buf, true); 1967 save(buf, true);
1968 } else 1968 } else
1969 rb->splash(HZ*2, "Solution too long to save"); 1969 rb->splash(HZ*2, "Solution too long to save");
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c
index 1fd59727fc..539fc85011 100644
--- a/apps/plugins/splitedit.c
+++ b/apps/plugins/splitedit.c
@@ -874,7 +874,7 @@ static void save_editor(struct mp3entry *mp3, int splittime)
874 break; 874 break;
875 875
876 case SE_PART1_NAME: 876 case SE_PART1_NAME:
877 rb->kbd_input(part1_name, MAX_PATH); 877 rb->kbd_input(part1_name, MAX_PATH, NULL);
878 break; 878 break;
879 879
880 case SE_PART2_SAVE: 880 case SE_PART2_SAVE:
@@ -882,7 +882,7 @@ static void save_editor(struct mp3entry *mp3, int splittime)
882 break; 882 break;
883 883
884 case SE_PART2_NAME: 884 case SE_PART2_NAME:
885 rb->kbd_input(part2_name, MAX_PATH); 885 rb->kbd_input(part2_name, MAX_PATH, NULL);
886 break; 886 break;
887 887
888 case SE_SAVE: 888 case SE_SAVE:
diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c
index 12880bd97b..34a1f6dd07 100644
--- a/apps/plugins/sudoku/sudoku.c
+++ b/apps/plugins/sudoku/sudoku.c
@@ -983,7 +983,7 @@ static int sudoku_edit_menu(struct sudoku_state_t* state)
983 983
984 switch (result) { 984 switch (result) {
985 case 0: /* Save new game */ 985 case 0: /* Save new game */
986 rb->kbd_input(state->filename,MAX_PATH); 986 rb->kbd_input(state->filename,MAX_PATH, NULL);
987 if (save_sudoku(state)) { 987 if (save_sudoku(state)) {
988 state->editmode=0; 988 state->editmode=0;
989 } else { 989 } else {
diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c
index fde11552ca..50027a30c6 100644
--- a/apps/plugins/superdom.c
+++ b/apps/plugins/superdom.c
@@ -689,7 +689,7 @@ static int save_game(void)
689 char savepath[MAX_PATH]; 689 char savepath[MAX_PATH];
690 690
691 rb->snprintf(savepath, sizeof(savepath), "/Savegame.ssg"); 691 rb->snprintf(savepath, sizeof(savepath), "/Savegame.ssg");
692 if(rb->kbd_input(savepath, MAX_PATH)) 692 if(rb->kbd_input(savepath, MAX_PATH, NULL))
693 { 693 {
694 DEBUGF("Keyboard input failed\n"); 694 DEBUGF("Keyboard input failed\n");
695 return -1; 695 return -1;
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c
index 0eb1bb1dcc..0cbb61c774 100644
--- a/apps/plugins/text_editor.c
+++ b/apps/plugins/text_editor.c
@@ -173,7 +173,7 @@ static bool save_changes(int overwrite)
173 173
174 if (newfile || !overwrite) 174 if (newfile || !overwrite)
175 { 175 {
176 if(rb->kbd_input(filename,MAX_PATH) < 0) 176 if(rb->kbd_input(filename,MAX_PATH, NULL) < 0)
177 { 177 {
178 newfile = true; 178 newfile = true;
179 return false; 179 return false;
@@ -247,7 +247,7 @@ static int do_item_menu(int cur_sel)
247 ret = MENU_RET_NO_UPDATE; 247 ret = MENU_RET_NO_UPDATE;
248 break; 248 break;
249 case 2: /* insert above */ 249 case 2: /* insert above */
250 if (!rb->kbd_input(copy_buffer,MAX_LINE_LEN)) 250 if (!rb->kbd_input(copy_buffer,MAX_LINE_LEN, NULL))
251 { 251 {
252 do_action(ACTION_INSERT,copy_buffer,cur_sel); 252 do_action(ACTION_INSERT,copy_buffer,cur_sel);
253 copy_buffer[0]='\0'; 253 copy_buffer[0]='\0';
@@ -255,7 +255,7 @@ static int do_item_menu(int cur_sel)
255 } 255 }
256 break; 256 break;
257 case 3: /* insert below */ 257 case 3: /* insert below */
258 if (!rb->kbd_input(copy_buffer,MAX_LINE_LEN)) 258 if (!rb->kbd_input(copy_buffer,MAX_LINE_LEN, NULL))
259 { 259 {
260 do_action(ACTION_INSERT,copy_buffer,cur_sel+1); 260 do_action(ACTION_INSERT,copy_buffer,cur_sel+1);
261 copy_buffer[0]='\0'; 261 copy_buffer[0]='\0';
@@ -425,7 +425,7 @@ enum plugin_status plugin_start(const void* parameter)
425 switch (rb->do_menu(&menu, NULL, NULL, false)) 425 switch (rb->do_menu(&menu, NULL, NULL, false))
426 { 426 {
427 case 0: 427 case 0:
428 temp_changed = !rb->kbd_input(extension, sizeof(extension)); 428 temp_changed = !rb->kbd_input(extension, sizeof(extension), NULL);
429 break; 429 break;
430 case 1: 430 case 1:
431 old_color = color; 431 old_color = color;
@@ -446,7 +446,7 @@ enum plugin_status plugin_start(const void* parameter)
446 } 446 }
447 else 447 else
448#endif 448#endif
449 if (!rb->kbd_input(temp_line,MAX_LINE_LEN)) 449 if (!rb->kbd_input(temp_line,MAX_LINE_LEN, NULL))
450 { 450 {
451 if (line_count) 451 if (line_count)
452 do_action(ACTION_UPDATE,temp_line,cur_sel); 452 do_action(ACTION_UPDATE,temp_line,cur_sel);
diff --git a/apps/plugins/zxbox/snapshot.c b/apps/plugins/zxbox/snapshot.c
index 74845bac8e..6d0797bf1e 100644
--- a/apps/plugins/zxbox/snapshot.c
+++ b/apps/plugins/zxbox/snapshot.c
@@ -628,7 +628,7 @@ void save_snapshot(void)
628 name[0]='/'; 628 name[0]='/';
629 name[1]='\0'; 629 name[1]='\0';
630 put_msg("Enter name of snapshot file to save:"); 630 put_msg("Enter name of snapshot file to save:");
631 if (!rb->kbd_input((char*)&name, sizeof name)) 631 if (!rb->kbd_input((char*)&name, sizeof(name), NULL))
632 save_snapshot_file(&name[0]); 632 save_snapshot_file(&name[0]);
633} 633}
634 634