Skip to content

Commit ae71c9c

Browse files
authored
Merge pull request xbmc#27563 from hbiyik/piers-fix-lost-keyboard-events
Fix wayland keymapping is not possible when the key id is unconventional
2 parents 5954dbc + 2396ddf commit ae71c9c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

xbmc/windowing/wayland/InputProcessorKeyboard.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ void CInputProcessorKeyboard::ConvertAndSendKey(std::uint32_t scancode, bool pre
158158
}
159159

160160
const XBMCKey xbmcKey{m_keymap->XBMCKeyForKeycode(xkbCode)};
161-
if (xbmcKey == XBMCKey::XBMCK_UNKNOWN && utf32 == 0)
161+
if (xbmcKey == XBMCKey::XBMCK_LAST)
162162
{
163163
// Such an event would carry no useful information in it and thus can be safely dropped here
164164
// This prevents starting an unnecessary timer for key presses
165-
CLog::Log(LOGDEBUG, "Unknown key event ignored (scancode: {})", scancode);
165+
CLog::Log(LOGDEBUG, LOGWINDOWING, "Key event ignored (scancode: {})", scancode);
166166
return;
167167
}
168168

xbmc/windowing/wayland/XkbcommonKeymap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ constexpr auto XkbKeycodeXBMCMappings = make_map<xkb_keycode_t, XBMCKey>({
212212
{XKB_KEY_WEBOS_CHANNEL_UP, XBMCK_PAGEUP},
213213
{XKB_KEY_WEBOS_INFO, XBMCK_INFO},
214214
{XKB_KEY_WEBOS_TVGUIDE, XBMCK_GUIDE},
215-
{XKB_KEY_WEBOS_CURSOR_HIDE, XBMCK_UNKNOWN},
216-
{XKB_KEY_WEBOS_CURSOR_SHOW, XBMCK_UNKNOWN},
217-
{XKB_KEY_WEBOS_INVALID, XBMCK_UNKNOWN},
215+
{XKB_KEY_WEBOS_CURSOR_HIDE, XBMCK_LAST},
216+
{XKB_KEY_WEBOS_CURSOR_SHOW, XBMCK_LAST},
217+
{XKB_KEY_WEBOS_INVALID, XBMCK_LAST},
218218
#endif
219219
});
220220

0 commit comments

Comments
 (0)