From 0dcaa505fa421f61e429f3d756fba85acc85ae57 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Thu, 27 Dec 2018 10:32:05 -0500 Subject: [PATCH] Replace "Del" key on keyboard with backspace since that is its function --- lv_objx/lv_kb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index c90ab27ad..395fc8d5d 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -33,21 +33,21 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt); static lv_signal_func_t ancestor_signal; static const char * kb_map_lc[] = { - "\2051#", "\204q", "\204w", "\204e", "\204r", "\204t", "\204y", "\204u", "\204i", "\204o", "\204p", "\207Del", "\n", + "\2051#", "\204q", "\204w", "\204e", "\204r", "\204t", "\204y", "\204u", "\204i", "\204o", "\204p", "\207Bksp", "\n", "\226ABC", "\203a", "\203s", "\203d", "\203f", "\203g", "\203h", "\203j", "\203k", "\203l", "\207Enter", "\n", "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" }; static const char * kb_map_uc[] = { - "\2051#", "\204Q", "\204W", "\204E", "\204R", "\204T", "\204Y", "\204U", "\204I", "\204O", "\204P", "\207Del", "\n", + "\2051#", "\204Q", "\204W", "\204E", "\204R", "\204T", "\204Y", "\204U", "\204I", "\204O", "\204P", "\207Bksp", "\n", "\226abc", "\203A", "\203S", "\203D", "\203F", "\203G", "\203H", "\203J", "\203K", "\203L", "\207Enter", "\n", "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" }; static const char * kb_map_spec[] = { - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\202Del", "\n", + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\202Bksp", "\n", "\222abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" @@ -56,7 +56,7 @@ static const char * kb_map_spec[] = { static const char * kb_map_num[] = { "1", "2", "3", "\202"SYMBOL_CLOSE, "\n", "4", "5", "6", "\202"SYMBOL_OK, "\n", - "7", "8", "9", "\202Del", "\n", + "7", "8", "9", "\202Bksp", "\n", "+/-", "0", ".", SYMBOL_LEFT, SYMBOL_RIGHT, "" }; /********************** @@ -437,7 +437,7 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) if(strcmp(txt, "Enter") == 0)lv_ta_add_char(ext->ta, '\n'); else if(strcmp(txt, SYMBOL_LEFT) == 0) lv_ta_cursor_left(ext->ta); else if(strcmp(txt, SYMBOL_RIGHT) == 0) lv_ta_cursor_right(ext->ta); - else if(strcmp(txt, "Del") == 0) lv_ta_del_char(ext->ta); + else if(strcmp(txt, "Bksp") == 0) lv_ta_del_char(ext->ta); else if(strcmp(txt, "+/-") == 0) { uint16_t cur = lv_ta_get_cursor_pos(ext->ta); const char * ta_txt = lv_ta_get_text(ext->ta);