From b1224032a1da6aba6580f4a28d30e2d3b7d0fc9e Mon Sep 17 00:00:00 2001 From: Christian Rupp Date: Wed, 8 Sep 2021 17:18:27 +0200 Subject: [PATCH] Add non US Backslash for international keyboards on Linux --- sunshine/platform/linux/input.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sunshine/platform/linux/input.cpp b/sunshine/platform/linux/input.cpp index e1d86a67..b96266d5 100644 --- a/sunshine/platform/linux/input.cpp +++ b/sunshine/platform/linux/input.cpp @@ -51,8 +51,8 @@ struct keycode_t { constexpr auto UNKNOWN = 0; -static constexpr std::array init_keycodes() { - std::array keycodes {}; +static constexpr std::array init_keycodes() { + std::array keycodes {}; #define __CONVERT(wincode, linuxcode, scancode) \ static_assert(wincode < keycodes.size(), "Keycode doesn't fit into keycode array"); \ @@ -182,6 +182,7 @@ static constexpr std::array init_keycodes() { __CONVERT(0xDC /* VKEY_OEM_5 */, KEY_BACKSLASH, 0x70031); __CONVERT(0xDD /* VKEY_OEM_6 */, KEY_RIGHTBRACE, 0x70030); __CONVERT(0xDE /* VKEY_OEM_7 */, KEY_APOSTROPHE, 0x70034); + __CONVERT(0xE2 /* VKEY_NON_US_BACKSLASH */, KEY_102ND, 0x70064); #undef __CONVERT return keycodes;