mirror of https://github.com/FreeRDP/FreeRDP
locale: reintroduce use of freerdp_detect_keyboard for default keyboard layout id
This commit is contained in:
parent
f1fc6d0c25
commit
df80dff43d
|
@ -81,6 +81,7 @@ uint32 freerdp_keyboard_init(uint32 keyboardLayoutId)
|
|||
#endif
|
||||
|
||||
#endif
|
||||
keyboardLayoutId = freerdp_detect_keyboard(keyboardLayoutId);
|
||||
|
||||
memset(RDP_SCANCODE_TO_X11_KEYCODE, 0, sizeof(RDP_SCANCODE_TO_X11_KEYCODE));
|
||||
for (keycode=0; keycode < ARRAY_SIZE(RDP_SCANCODE_TO_X11_KEYCODE); keycode++)
|
||||
|
|
|
@ -211,18 +211,6 @@ uint32 freerdp_keyboard_init_x11(uint32 keyboardLayoutId, RDP_SCANCODE x11_keyco
|
|||
memset(keycode_to_vkcode, 0, sizeof(keycode_to_vkcode));
|
||||
memset(x11_keycode_to_rdp_scancode, 0, sizeof(x11_keycode_to_rdp_scancode));
|
||||
|
||||
if (keyboardLayoutId == 0)
|
||||
{
|
||||
keyboardLayoutId = freerdp_detect_keyboard_layout_from_system_locale();
|
||||
DEBUG_KBD("using keyboard layout: %X", keyboardLayoutId);
|
||||
}
|
||||
|
||||
if (keyboardLayoutId == 0)
|
||||
{
|
||||
keyboardLayoutId = 0x0409;
|
||||
DEBUG_KBD("using default keyboard layout: %X", keyboardLayoutId);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* Apple X11 breaks XKB detection */
|
||||
freerdp_keyboard_load_map(keycode_to_vkcode, "macosx(macosx)");
|
||||
|
|
Loading…
Reference in New Issue