Reuse evdev/X11 keymap for wayland

This commit is contained in:
Olivier Blin 2017-07-03 19:45:59 +02:00
parent 3afacb0445
commit 3e5f8c6bdb
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;
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)
return TRUE;

View File

@ -69,4 +69,8 @@ if(WITH_X11)
endif()
endif()
if(WITH_WAYLAND)
freerdp_definition_add(-DWITH_WAYLAND)
endif()
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 keycode;
#if defined(__APPLE__) || defined(WITH_X11)
#if defined(__APPLE__) || defined(WITH_X11) || defined(WITH_WAYLAND)
int status = -1;
#endif
@ -107,7 +107,7 @@ DWORD freerdp_keyboard_init(DWORD keyboardLayoutId)
status = freerdp_keyboard_init_apple(&keyboardLayoutId, X11_KEYCODE_TO_VIRTUAL_SCANCODE);
#endif
#ifdef WITH_X11
#if defined(WITH_X11) || defined(WITH_WAYLAND)
#ifdef WITH_XKBFILE
if (status < 0)