Merge pull request #4034 from blino/wayland-keymap

Reuse evdev/X11 keymap for wayland
This commit is contained in:
akallabeth 2017-11-16 12:07:07 +01:00 committed by GitHub
commit 668e347814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -92,7 +92,7 @@ BOOL wlf_handle_key(freerdp *instance, UwacKeyEvent *ev) {
rdpInput* input = instance->input; rdpInput* input = instance->input;
DWORD rdp_scancode; DWORD rdp_scancode;
rdp_scancode = (DWORD) ev->raw_key; rdp_scancode = freerdp_keyboard_get_rdp_scancode_from_x11_keycode(ev->raw_key + 8);
if (rdp_scancode == RDP_SCANCODE_UNKNOWN) if (rdp_scancode == RDP_SCANCODE_UNKNOWN)
return TRUE; return TRUE;

View File

@ -69,4 +69,8 @@ if(WITH_X11)
endif() endif()
endif() endif()
if(WITH_WAYLAND)
freerdp_definition_add(-DWITH_WAYLAND)
endif()
freerdp_module_add(${${MODULE_PREFIX}_SRCS}) freerdp_module_add(${${MODULE_PREFIX}_SRCS})

View File

@ -98,7 +98,7 @@ int freerdp_keyboard_init_x11_evdev(DWORD* keyboardLayoutId, DWORD x11_keycode_t
DWORD freerdp_keyboard_init(DWORD keyboardLayoutId) DWORD freerdp_keyboard_init(DWORD keyboardLayoutId)
{ {
DWORD keycode; DWORD keycode;
#if defined(__APPLE__) || defined(WITH_X11) #if defined(__APPLE__) || defined(WITH_X11) || defined(WITH_WAYLAND)
int status = -1; int status = -1;
#endif #endif
@ -107,7 +107,7 @@ DWORD freerdp_keyboard_init(DWORD keyboardLayoutId)
status = freerdp_keyboard_init_apple(&keyboardLayoutId, X11_KEYCODE_TO_VIRTUAL_SCANCODE); status = freerdp_keyboard_init_apple(&keyboardLayoutId, X11_KEYCODE_TO_VIRTUAL_SCANCODE);
#endif #endif
#ifdef WITH_X11 #if defined(WITH_X11) || defined(WITH_WAYLAND)
#ifdef WITH_XKBFILE #ifdef WITH_XKBFILE
if (status < 0) if (status < 0)