summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-08-07 19:22:33 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-08-07 19:22:33 -0300
commitb77200728e7f2b2dd446a9717c83a20c9aac0ce4 (patch)
treed5fd8da846cb1f86b68ecb6a1e0e4da5cae1a9dd /core/os
parent6671c6bdc78864bbe1d27c508ec9528f3b683ca2 (diff)
-Added yield nodes to visual script
-Added input selection nodes to visual script -Added script create icon for those who miss it, will only appear when it can be used.
Diffstat (limited to 'core/os')
-rw-r--r--core/os/keyboard.cpp21
-rw-r--r--core/os/keyboard.h3
2 files changed, 24 insertions, 0 deletions
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp
index 4c0a074a07..26b481840a 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) {
diff --git a/core/os/keyboard.h b/core/os/keyboard.h
index 80472acc09..fd52d331c8 100644
--- a/core/os/keyboard.h
+++ b/core/os/keyboard.h
@@ -328,6 +328,9 @@ enum KeyModifierMask {
String keycode_get_string(uint32_t p_code);
bool keycode_has_unicode(uint32_t p_unicode);
int find_keycode(const String& p_code);
+int keycode_get_count();
+int keycode_get_value_by_index(int p_index);
+const char* keycode_get_name_by_index(int p_index);
int latin_keyboard_keycode_convert(int p_keycode);
#endif