aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuzzard <fuzzard@users.noreply.github.com>2023-12-09 14:25:34 +1000
committerGitHub <noreply@github.com>2023-12-09 14:25:34 +1000
commit485ef81a0104dbbbff1488633c4164fbc64055ec (patch)
tree9dc6dcdfbbdf06ab32e792dd8d88bc1078bacd90
parent5e70594e16bf1ac2738e82d66129c1c7aff68656 (diff)
parentba056fb75e1406849b79409b4457203444079780 (diff)
Merge pull request #24202 from garbear/add-oem-102
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,