diff --git a/libfreerdp-locale/keyboard.c b/libfreerdp-locale/keyboard.c index 57de06b2c..bbda4c329 100644 --- a/libfreerdp-locale/keyboard.c +++ b/libfreerdp-locale/keyboard.c @@ -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++) diff --git a/libfreerdp-locale/keyboard_x11.c b/libfreerdp-locale/keyboard_x11.c index ebca53293..32ec3e2fd 100644 --- a/libfreerdp-locale/keyboard_x11.c +++ b/libfreerdp-locale/keyboard_x11.c @@ -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)");