1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes

Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
This commit is contained in:
Rémi Verschelde
2020-03-01 23:00:42 +01:00
committed by GitHub
78 changed files with 736 additions and 299 deletions

View File

@@ -1134,15 +1134,17 @@ String _OS::get_system_dir(SystemDir p_dir) const {
return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir));
}
String _OS::get_scancode_string(uint32_t p_code) const {
String _OS::get_keycode_string(uint32_t p_code) const {
return keycode_get_string(p_code);
}
bool _OS::is_scancode_unicode(uint32_t p_unicode) const {
bool _OS::is_keycode_unicode(uint32_t p_unicode) const {
return keycode_has_unicode(p_unicode);
}
int _OS::find_scancode_from_string(const String &p_code) const {
int _OS::find_keycode_from_string(const String &p_code) const {
return find_keycode(p_code);
}
@@ -1333,9 +1335,9 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("native_video_pause"), &_OS::native_video_pause);
ClassDB::bind_method(D_METHOD("native_video_unpause"), &_OS::native_video_unpause);
ClassDB::bind_method(D_METHOD("get_scancode_string", "code"), &_OS::get_scancode_string);
ClassDB::bind_method(D_METHOD("is_scancode_unicode", "code"), &_OS::is_scancode_unicode);
ClassDB::bind_method(D_METHOD("find_scancode_from_string", "string"), &_OS::find_scancode_from_string);
ClassDB::bind_method(D_METHOD("get_keycode_string", "code"), &_OS::get_keycode_string);
ClassDB::bind_method(D_METHOD("is_keycode_unicode", "code"), &_OS::is_keycode_unicode);
ClassDB::bind_method(D_METHOD("find_keycode_from_string", "string"), &_OS::find_keycode_from_string);
ClassDB::bind_method(D_METHOD("set_use_file_access_save_and_swap", "enabled"), &_OS::set_use_file_access_save_and_swap);