Fixed keyboard layout detection for windows

This commit is contained in:
akallabeth 2020-12-11 12:58:51 +01:00
parent 7eb3ff518a
commit af81d9bb47
1 changed files with 4 additions and 0 deletions

View File

@ -47,6 +47,10 @@ DWORD X11_KEYCODE_TO_VIRTUAL_SCANCODE[256];
int freerdp_detect_keyboard(DWORD* keyboardLayoutId)
{
#if defined(_WIN32)
*keyboardLayoutId = (DWORD)GetKeyboardLayout(0) & 0x0000FFFF;
#endif
#ifdef WITH_X11
if (*keyboardLayoutId == 0)
freerdp_detect_keyboard_layout_from_xkb(keyboardLayoutId);