locale: reintroduce use of freerdp_detect_keyboard for default keyboard layout id

This commit is contained in:
Mads Kiilerich 2012-03-24 01:57:10 +01:00
parent f1fc6d0c25
commit df80dff43d
2 changed files with 1 additions and 12 deletions

View File

@ -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++)

View File

@ -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)");