diff options
Diffstat (limited to 'core/os/keyboard.cpp')
-rw-r--r-- | core/os/keyboard.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp index c65d3fefc2..d088151a6d 100644 --- a/core/os/keyboard.cpp +++ b/core/os/keyboard.cpp @@ -293,9 +293,7 @@ static const _KeyCodeText _keycodes[] = { }; bool keycode_has_unicode(uint32_t p_keycode) { - switch (p_keycode) { - case KEY_ESCAPE: case KEY_TAB: case KEY_BACKTAB: @@ -394,7 +392,6 @@ bool keycode_has_unicode(uint32_t p_keycode) { } String keycode_get_string(uint32_t p_code) { - String codestr; if (p_code & KEY_MASK_SHIFT) { codestr += find_keycode_name(KEY_SHIFT); @@ -418,9 +415,7 @@ String keycode_get_string(uint32_t p_code) { const _KeyCodeText *kct = &_keycodes[0]; while (kct->text) { - if (kct->code == (int)p_code) { - codestr += kct->text; return codestr; } @@ -433,11 +428,9 @@ String keycode_get_string(uint32_t p_code) { } int find_keycode(const String &p_code) { - const _KeyCodeText *kct = &_keycodes[0]; while (kct->text) { - if (p_code.nocasecmp_to(kct->text) == 0) { return kct->code; } @@ -448,11 +441,9 @@ int find_keycode(const String &p_code) { } const char *find_keycode_name(int p_keycode) { - const _KeyCodeText *kct = &_keycodes[0]; while (kct->text) { - if (kct->code == p_keycode) { return kct->text; } @@ -463,12 +454,10 @@ const char *find_keycode_name(int p_keycode) { } int keycode_get_count() { - const _KeyCodeText *kct = &_keycodes[0]; int count = 0; while (kct->text) { - count++; kct++; } |