1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Merge pull request #56015 from bruvzg/phy_code_conv

This commit is contained in:
Rémi Verschelde
2022-01-16 11:36:26 +01:00
committed by GitHub
15 changed files with 255 additions and 135 deletions

View File

@@ -347,6 +347,16 @@ unsigned int KeyMappingWindows::get_keysym(unsigned int p_code) {
return KEY_UNKNOWN;
}
unsigned int KeyMappingWindows::get_scancode(unsigned int p_keycode) {
for (int i = 0; _scancode_to_keycode[i].keysym != KEY_UNKNOWN; i++) {
if (_scancode_to_keycode[i].keysym == p_keycode) {
return _scancode_to_keycode[i].keycode;
}
}
return 0;
}
unsigned int KeyMappingWindows::get_scansym(unsigned int p_code, bool p_extended) {
unsigned int keycode = KEY_UNKNOWN;
for (int i = 0; _scancode_to_keycode[i].keysym != KEY_UNKNOWN; i++) {