mirror of https://github.com/xbmc/xbmc
Merge pull request #27563 from hbiyik/piers-fix-lost-keyboard-events
Fix wayland keymapping is not possible when the key id is unconventional
This commit is contained in:
commit
ae71c9c501
|
|
@ -158,11 +158,11 @@ void CInputProcessorKeyboard::ConvertAndSendKey(std::uint32_t scancode, bool pre
|
|||
}
|
||||
|
||||
const XBMCKey xbmcKey{m_keymap->XBMCKeyForKeycode(xkbCode)};
|
||||
if (xbmcKey == XBMCKey::XBMCK_UNKNOWN && utf32 == 0)
|
||||
if (xbmcKey == XBMCKey::XBMCK_LAST)
|
||||
{
|
||||
// Such an event would carry no useful information in it and thus can be safely dropped here
|
||||
// This prevents starting an unnecessary timer for key presses
|
||||
CLog::Log(LOGDEBUG, "Unknown key event ignored (scancode: {})", scancode);
|
||||
CLog::Log(LOGDEBUG, LOGWINDOWING, "Key event ignored (scancode: {})", scancode);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -212,9 +212,9 @@ constexpr auto XkbKeycodeXBMCMappings = make_map<xkb_keycode_t, XBMCKey>({
|
|||
{XKB_KEY_WEBOS_CHANNEL_UP, XBMCK_PAGEUP},
|
||||
{XKB_KEY_WEBOS_INFO, XBMCK_INFO},
|
||||
{XKB_KEY_WEBOS_TVGUIDE, XBMCK_GUIDE},
|
||||
{XKB_KEY_WEBOS_CURSOR_HIDE, XBMCK_UNKNOWN},
|
||||
{XKB_KEY_WEBOS_CURSOR_SHOW, XBMCK_UNKNOWN},
|
||||
{XKB_KEY_WEBOS_INVALID, XBMCK_UNKNOWN},
|
||||
{XKB_KEY_WEBOS_CURSOR_HIDE, XBMCK_LAST},
|
||||
{XKB_KEY_WEBOS_CURSOR_SHOW, XBMCK_LAST},
|
||||
{XKB_KEY_WEBOS_INVALID, XBMCK_LAST},
|
||||
#endif
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue