Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
@@ -316,6 +316,9 @@ then
|
||||
pacman -S --needed --noconfirm "$pkg"
|
||||
done
|
||||
fi
|
||||
|
||||
# Clean pacman cache when running under Jenkins to save disk space.
|
||||
[ "$CI" = "true" ] && rm -rf /var/cache/pacman/pkg
|
||||
|
||||
# Generate a new freetype DLL for this architecture.
|
||||
rm -f "$freetype_dll"
|
||||
|
@@ -18,14 +18,13 @@
|
||||
#include <QtDebug>
|
||||
|
||||
static std::unordered_map<uint32_t, uint16_t> evdev_keycodes = {
|
||||
{99, 0x54}, /* SYSRQ */
|
||||
{184, 0x46}, /* F14 => Scroll Lock (for Apple keyboards) */
|
||||
{86, 0x56}, /* 102ND */
|
||||
{87, 0x57}, /* F11 */
|
||||
{88, 0x58}, /* F12 */
|
||||
{117, 0x59}, /* KPEQUAL */
|
||||
{183, 0x5d}, /* F13 */
|
||||
{184, 0x5e}, /* F14 */
|
||||
{185, 0x5f}, /* F15 */
|
||||
{186, 0x5d}, /* F16 => F13 */
|
||||
{187, 0x5e}, /* F17 => F14 */
|
||||
{188, 0x5f}, /* F18 => F15 */
|
||||
|
||||
/* Japanese keys. */
|
||||
{95, 0x5c}, /* KPJPCOMMA */
|
||||
@@ -47,9 +46,11 @@ static std::unordered_map<uint32_t, uint16_t> evdev_keycodes = {
|
||||
{97, 0x11d}, /* RIGHTCTRL */
|
||||
{98, 0x135}, /* KPSLASH */
|
||||
{99, 0x137}, /* SYSRQ */
|
||||
{183, 0x137}, /* F13 => SysRq (for Apple keyboards) */
|
||||
{100, 0x138}, /* RIGHTALT */
|
||||
{119, 0x145}, /* PAUSE */
|
||||
{411, 0x145}, /* BREAK */
|
||||
{185, 0x145}, /* F15 => Pause (for Apple keyboards) */
|
||||
{102, 0x147}, /* HOME */
|
||||
{103, 0x148}, /* UP */
|
||||
{104, 0x149}, /* PAGEUP */
|
||||
|
@@ -1394,12 +1394,19 @@ MainWindow::keyPressEvent(QKeyEvent *event)
|
||||
keyboard_input(1, 0x1D);
|
||||
keyboard_input(1, 0x45);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
#ifdef Q_OS_MACOS
|
||||
processMacKeyboardInput(true, event);
|
||||
#else
|
||||
keyboard_input(1, x11_keycode_to_keysym(event->nativeScanCode()));
|
||||
auto scan = x11_keycode_to_keysym(event->nativeScanCode());
|
||||
if (scan == 0x145) {
|
||||
/* Special case for Pause. */
|
||||
keyboard_input(1, scan & 0xff00);
|
||||
scan &= 0x00ff;
|
||||
}
|
||||
keyboard_input(1, scan);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if ((video_fullscreen > 0) && keyboard_isfsexit()) {
|
||||
@@ -1446,7 +1453,13 @@ MainWindow::keyReleaseEvent(QKeyEvent *event)
|
||||
#ifdef Q_OS_MACOS
|
||||
processMacKeyboardInput(false, event);
|
||||
#else
|
||||
keyboard_input(0, x11_keycode_to_keysym(event->nativeScanCode()));
|
||||
auto scan = x11_keycode_to_keysym(event->nativeScanCode());
|
||||
if (scan == 0x145) {
|
||||
/* Special case for Pause. */
|
||||
keyboard_input(0, scan & 0xff00);
|
||||
scan &= 0x00ff;
|
||||
}
|
||||
keyboard_input(0, scan);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -102,6 +102,7 @@ static std::unordered_map<std::string, uint16_t> xkb_keycodes = {
|
||||
|
||||
{"NMLK", 0x45},
|
||||
{"SCLK", 0x46},
|
||||
{"FK14", 0x46}, /* F14 => Scroll Lock (for Apple keyboards) */
|
||||
{"KP7", 0x47},
|
||||
{"KP8", 0x48},
|
||||
{"KP9", 0x49},
|
||||
@@ -119,12 +120,13 @@ static std::unordered_map<std::string, uint16_t> xkb_keycodes = {
|
||||
{"LSGT", 0x56},
|
||||
{"FK11", 0x57},
|
||||
{"FK12", 0x58},
|
||||
{"FK13", 0x5d},
|
||||
{"FK14", 0x5e},
|
||||
{"FK15", 0x5f},
|
||||
{"FK16", 0x5d}, /* F16 => F13 */
|
||||
{"FK17", 0x5e}, /* F17 => F14 */
|
||||
{"FK18", 0x5f}, /* F18 => F15 */
|
||||
|
||||
/* Japanese keys. */
|
||||
{"JPCM", 0x5c}, /* evdev KPJPCOMMA */
|
||||
{"JPCM", 0x5c}, /* Num, */
|
||||
{"KPDC", 0x5c},
|
||||
{"HKTG", 0x70}, /* hiragana-katakana toggle */
|
||||
{"AB11", 0x73}, /* \_ and Brazilian /? */
|
||||
{"HZTG", 0x76}, /* hankaku-zenkaku toggle */
|
||||
@@ -145,8 +147,11 @@ static std::unordered_map<std::string, uint16_t> xkb_keycodes = {
|
||||
{"KPDV", 0x135},
|
||||
{"PRSC", 0x137},
|
||||
{"SYRQ", 0x137},
|
||||
{"FK13", 0x137}, /* F13 => SysRq (for Apple keyboards) */
|
||||
{"RALT", 0x138},
|
||||
{"ALGR", 0x138},
|
||||
{"PAUS", 0x145},
|
||||
{"FK15", 0x145}, /* F15 => Pause (for Apple keyboards) */
|
||||
{"BRK", 0x145},
|
||||
{"HOME", 0x147},
|
||||
{"UP", 0x148},
|
||||
|
Reference in New Issue
Block a user