summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-01-04 21:16:40 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-01-04 21:16:40 -0300
commit8c4dd8de3919b789eac1a0f030563008bdcd44f5 (patch)
tree63232bc8047dec17fea773093f156534a562e90a /core
parenta8bcb96ad4c940c93d3fd561ddd29ce38b529303 (diff)
-WIP to add proper key swapping according to keyboard layout
-fix with non working removal of collision exception in 3D physics
Diffstat (limited to 'core')
-rw-r--r--core/os/keyboard.cpp5
-rw-r--r--core/os/keyboard.h1
-rw-r--r--core/os/os.cpp5
-rw-r--r--core/os/os.h13
4 files changed, 24 insertions, 0 deletions
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp
index a4201c34ea..c9979d1921 100644
--- a/core/os/keyboard.cpp
+++ b/core/os/keyboard.cpp
@@ -353,3 +353,8 @@ int find_keycode(const String& p_code) {
return 0;
}
+
+int latin_keyboard_keycode_convert(int p_keycode){
+
+ return p_keycode;
+}
diff --git a/core/os/keyboard.h b/core/os/keyboard.h
index 18b56b5830..b4ec5da26f 100644
--- a/core/os/keyboard.h
+++ b/core/os/keyboard.h
@@ -328,5 +328,6 @@ 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 latin_keyboard_keycode_convert(int p_keycode);
#endif
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 081f7c1c5e..5e0e5eed77 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -485,6 +485,11 @@ void OS::set_time_scale(float p_scale) {
_time_scale=p_scale;
}
+OS::LatinKeyboardVariant OS::get_latin_keyboard_variant() const {
+
+ return LATIN_KEYBOARD_QWERTY;
+}
+
float OS::get_time_scale() const {
return _time_scale;
diff --git a/core/os/os.h b/core/os/os.h
index 805d6ac57d..d4deff2f5e 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -34,6 +34,7 @@
#include "vector.h"
#include "os/main_loop.h"
#include <stdarg.h>
+
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
@@ -348,6 +349,18 @@ public:
virtual Error dialog_input_text(String p_title, String p_description, String p_partial, Object* p_obj, String p_callback);
+ enum LatinKeyboardVariant {
+ LATIN_KEYBOARD_QWERTY,
+ LATIN_KEYBOARD_QWERTZ,
+ LATIN_KEYBOARD_AZERTY,
+ LATIN_KEYBOARD_QZERTY,
+ LATIN_KEYBOARD_DVORAK,
+ LATIN_KEYBOARD_NEO,
+ };
+
+
+ virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
+
void set_time_scale(float p_scale);
float get_time_scale() const;