diff options
| author | Juan Linietsky | 2016-08-07 19:22:33 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-08-07 19:22:33 -0300 |
| commit | b77200728e7f2b2dd446a9717c83a20c9aac0ce4 (patch) | |
| tree | d5fd8da846cb1f86b68ecb6a1e0e4da5cae1a9dd /core/os/keyboard.cpp | |
| parent | 6671c6bdc78864bbe1d27c508ec9528f3b683ca2 (diff) | |
| download | godot-b77200728e7f2b2dd446a9717c83a20c9aac0ce4.tar.gz godot-b77200728e7f2b2dd446a9717c83a20c9aac0ce4.tar.zst godot-b77200728e7f2b2dd446a9717c83a20c9aac0ce4.zip | |
Diffstat (limited to 'core/os/keyboard.cpp')
| -rw-r--r-- | core/os/keyboard.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp index 4c0a074a0..26b481840 100644 --- a/core/os/keyboard.cpp +++ b/core/os/keyboard.cpp @@ -429,6 +429,27 @@ static const _KeyCodeReplace _keycode_replace_neo[]={ {0,0} }; +int keycode_get_count() { + + const _KeyCodeText *kct =&_keycodes[0]; + + int count=0; + while(kct->text) { + + count++; + kct++; + } + return count; +} + +int keycode_get_value_by_index(int p_index) { + _keycodes[p_index].code; +} + +const char* keycode_get_name_by_index(int p_index) { + return _keycodes[p_index].text; +} + int latin_keyboard_keycode_convert(int p_keycode) { |
