diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-01 11:53:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 11:53:01 +0200 |
commit | a7011fa29488f5356949667eb8e2b296cbbd9923 (patch) | |
tree | 2b8cd4b339ef65f25c57f2d637a3c7bc8fe26724 /servers | |
parent | 769691ab53f46763582a46df8c4583f9ba1a944f (diff) | |
parent | 650e63a7ca433e70ab458893f1dcbb8820278d86 (diff) |
Merge pull request #52684 from Frixuu/master
Diffstat (limited to 'servers')
-rw-r--r-- | servers/display_server.cpp | 5 | ||||
-rw-r--r-- | servers/display_server.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index cdf892094d..3897e5e7c2 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -285,6 +285,10 @@ String DisplayServer::keyboard_get_layout_name(int p_index) const { return "Not supported"; } +Key DisplayServer::keyboard_get_keycode_from_physical(Key p_keycode) const { + ERR_FAIL_V_MSG(p_keycode, "Not supported by this display server."); +} + void DisplayServer::force_process_and_drop_events() { } @@ -452,6 +456,7 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("keyboard_set_current_layout", "index"), &DisplayServer::keyboard_set_current_layout); ClassDB::bind_method(D_METHOD("keyboard_get_layout_language", "index"), &DisplayServer::keyboard_get_layout_language); ClassDB::bind_method(D_METHOD("keyboard_get_layout_name", "index"), &DisplayServer::keyboard_get_layout_name); + ClassDB::bind_method(D_METHOD("keyboard_get_keycode_from_physical", "keycode"), &DisplayServer::keyboard_get_keycode_from_physical); ClassDB::bind_method(D_METHOD("process_events"), &DisplayServer::process_events); ClassDB::bind_method(D_METHOD("force_process_and_drop_events"), &DisplayServer::force_process_and_drop_events); diff --git a/servers/display_server.h b/servers/display_server.h index 788206768c..f411a72aa3 100644 --- a/servers/display_server.h +++ b/servers/display_server.h @@ -343,6 +343,7 @@ public: virtual void keyboard_set_current_layout(int p_index); virtual String keyboard_get_layout_language(int p_index) const; virtual String keyboard_get_layout_name(int p_index) const; + virtual Key keyboard_get_keycode_from_physical(Key p_keycode) const; virtual int tablet_get_driver_count() const { return 1; }; virtual String tablet_get_driver_name(int p_driver) const { return "default"; }; |