aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Brown <themagnificentmrb@gmail.com>2023-12-07 16:28:15 -0800
committerGarrett Brown <themagnificentmrb@gmail.com>2023-12-07 16:34:43 -0800
commitba056fb75e1406849b79409b4457203444079780 (patch)
treea7e9679a4437720b44b0dcd4ad5d89746876a6ba
parentff07dd77605fdd30c6e8fe26730b356b2b808a97 (diff)
Add OEM 102 key (OEM key on 102-key keyboards)
-rw-r--r--xbmc/games/controllers/ControllerTranslator.cpp4
-rw-r--r--xbmc/input/XBMC_keysym.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/xbmc/games/controllers/ControllerTranslator.cpp b/xbmc/games/controllers/ControllerTranslator.cpp
index df8641be28..c840a1845d 100644
--- a/xbmc/games/controllers/ControllerTranslator.cpp
+++ b/xbmc/games/controllers/ControllerTranslator.cpp
@@ -450,6 +450,8 @@ KEYBOARD::KeySymbol CControllerTranslator::TranslateKeysym(const std::string& sy
return XBMCK_EURO;
if (symbol == "undo")
return XBMCK_UNDO;
+ if (symbol == "oem102")
+ return XBMCK_OEM_102;
return XBMCK_UNKNOWN;
}
@@ -736,6 +738,8 @@ const char* CControllerTranslator::TranslateKeycode(KEYBOARD::KeySymbol keycode)
return "euro";
case XBMCK_UNDO:
return "undo";
+ case XBMCK_OEM_102:
+ return "oem102";
default:
break;
}
diff --git a/xbmc/input/XBMC_keysym.h b/xbmc/input/XBMC_keysym.h
index 0d65130b92..7a23dabc33 100644
--- a/xbmc/input/XBMC_keysym.h
+++ b/xbmc/input/XBMC_keysym.h
@@ -133,6 +133,11 @@ typedef enum
XBMCK_MEDIA_REWIND = 0xBA,
XBMCK_MEDIA_FASTFORWARD = 0xBB,
+ // This key is not present on standard US keyboard layouts. For European
+ // layouts it's usually located to the right of left-shift key, with '\' as
+ // its main function.
+ XBMCK_OEM_102 = 0xE2,
+
// Numeric keypad
XBMCK_KP0 = 0x100,
XBMCK_KP1 = 0x101,