summaryrefslogtreecommitdiffstats
path: root/apps/plugins/keybox.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-07-21 02:33:53 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2020-07-22 06:48:28 -0400
commitcb94b3ae2ee7a66845895e2c704cdf62ee74ba13 (patch)
tree0b2da61e3d513fdc37d18f075b6c079e85165781 /apps/plugins/keybox.c
parenta5df94beb5cd7fd87828b9532b4a1a4da13ef774 (diff)
downloadrockbox-cb94b3ae2ee7a66845895e2c704cdf62ee74ba13.tar.gz
rockbox-cb94b3ae2ee7a66845895e2c704cdf62ee74ba13.tar.bz2
rockbox-cb94b3ae2ee7a66845895e2c704cdf62ee74ba13.zip
keyboard add ability to specify temporary custom layouts
rb core allows you to load custom keyboard layouts this patch adds the ability to load a keyboard layout in a buffer the custom layout is temporary and does not overwrite the current layout use like so: unsigned short kbd[64]; unsigned short *kbd_p = kbd; if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd))) kbd_p = NULL; rb->kbd_input(buf,sizeof(buf), kbd_p); Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
Diffstat (limited to 'apps/plugins/keybox.c')
-rw-r--r--apps/plugins/keybox.c18
1 files changed, 9 insertions, 9 deletions
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)
rb->splash(HZ, "Enter title");
pw_list.entries[i].title[0] = '\0';
- if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN) < 0)
+ if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN, NULL) < 0)
return;
rb->splash(HZ, "Enter name");
pw_list.entries[i].name[0] = '\0';
- if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN) < 0)
+ if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN, NULL) < 0)
{
pw_list.entries[i].title[0] = '\0';
return;
@@ -209,7 +209,7 @@ static void add_entry(int selected_item)
rb->splash(HZ, "Enter password");
pw_list.entries[i].password[0] = '\0';
- if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN) < 0)
+ if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN, NULL) < 0)
{
pw_list.entries[i].title[0] = '\0';
pw_list.entries[i].name[0] = '\0';
@@ -244,7 +244,7 @@ static void edit_title(int selected_item)
if (entry->next)
entry = entry->next;
}
- if (rb->kbd_input(entry->title, FIELD_LEN) == 0)
+ if (rb->kbd_input(entry->title, FIELD_LEN, NULL) == 0)
data_changed = true;
}
@@ -257,7 +257,7 @@ static void edit_name(int selected_item)
if (entry->next)
entry = entry->next;
}
- if (rb->kbd_input(entry->name, FIELD_LEN) == 0)
+ if (rb->kbd_input(entry->name, FIELD_LEN, NULL) == 0)
data_changed = true;
}
@@ -270,7 +270,7 @@ static void edit_pw(int selected_item)
if (entry->next)
entry = entry->next;
}
- if (rb->kbd_input(entry->password, FIELD_LEN) == 0)
+ if (rb->kbd_input(entry->password, FIELD_LEN, NULL) == 0)
data_changed = true;
}
@@ -513,11 +513,11 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw)
if (new_pw)
{
rb->splash(HZ, "Enter new master password");
- if (rb->kbd_input(buf[0], sizeof(buf[0])) < 0)
+ if (rb->kbd_input(buf[0], sizeof(buf[0]), NULL) < 0)
return -1;
rb->splash(HZ, "Confirm master password");
- if (rb->kbd_input(buf[1], sizeof(buf[1])) < 0)
+ if (rb->kbd_input(buf[1], sizeof(buf[1]), NULL) < 0)
return -1;
if (rb->strcmp(buf[0], buf[1]))
@@ -534,7 +534,7 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw)
}
rb->splash(HZ, "Enter master password");
- if (rb->kbd_input(pw_buf, buflen) < 0)
+ if (rb->kbd_input(pw_buf, buflen, NULL) < 0)
return -1;
hash_pw(&pwhash);
return 0;