diff --git a/src/qt/evdev_keyboard.cpp b/src/qt/evdev_keyboard.cpp index 505618ef7..9dbb4127a 100644 --- a/src/qt/evdev_keyboard.cpp +++ b/src/qt/evdev_keyboard.cpp @@ -69,6 +69,7 @@ static std::unordered_map evdev_keycodes = { /* Multimedia keys. Guideline is to try and follow the Microsoft standard, then fill in remaining scancodes with OEM-specific keys for redundancy sake. Keys marked with # are not translated into evdev codes by the standard atkbd driver. */ + {634, 0x54}, /* SELECTIVE_SCREENSHOT# => Alt+SysRq */ {117, 0x59}, /* KPEQUAL */ {418, 0x6a}, /* ZOOMIN# => Logitech */ {420, 0x6b}, /* ZOOMRESET# => Logitech */ @@ -107,7 +108,6 @@ static std::unordered_map evdev_keycodes = { {115, 0x130}, /* VOL+ */ {150, 0x132}, /* WWW# */ {172, 0x132}, /* HOMEPAGE */ - {634, 0x137}, /* SELECTIVE_SCREENSHOT# => SysRq */ {138, 0x13b}, /* HELP# */ {213, 0x13c}, /* SOUND# => My Music/Office Home */ {360, 0x13c}, /* VENDOR# => My Music/Office Home */ diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 91bf76d67..13a32723c 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -931,6 +931,16 @@ MainWindow::processKeyboardInput(bool down, uint32_t keycode) /* Apply special cases. */ switch (keycode) { + case 0x54: /* Alt + Print Screen (special case, i.e. evdev SELECTIVE_SCREENSHOT) */ + /* Send Alt as well. */ + if (down) { + keyboard_input(down, 0x38); + } else { + keyboard_input(down, keycode); + keycode = 0x38; + } + break; + case 0x11d: /* Right Ctrl */ if (rctrl_is_lalt) keycode = 0x38; /* map to Left Alt */