qt: Add Alt+PrtSc special case for one evdev key
This commit is contained in:
@@ -69,6 +69,7 @@ static std::unordered_map<uint32_t, uint16_t> evdev_keycodes = {
|
|||||||
/* Multimedia keys. Guideline is to try and follow the Microsoft standard, then
|
/* Multimedia keys. Guideline is to try and follow the Microsoft standard, then
|
||||||
fill in remaining scancodes with OEM-specific keys for redundancy sake. Keys
|
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. */
|
marked with # are not translated into evdev codes by the standard atkbd driver. */
|
||||||
|
{634, 0x54}, /* SELECTIVE_SCREENSHOT# => Alt+SysRq */
|
||||||
{117, 0x59}, /* KPEQUAL */
|
{117, 0x59}, /* KPEQUAL */
|
||||||
{418, 0x6a}, /* ZOOMIN# => Logitech */
|
{418, 0x6a}, /* ZOOMIN# => Logitech */
|
||||||
{420, 0x6b}, /* ZOOMRESET# => Logitech */
|
{420, 0x6b}, /* ZOOMRESET# => Logitech */
|
||||||
@@ -107,7 +108,6 @@ static std::unordered_map<uint32_t, uint16_t> evdev_keycodes = {
|
|||||||
{115, 0x130}, /* VOL+ */
|
{115, 0x130}, /* VOL+ */
|
||||||
{150, 0x132}, /* WWW# */
|
{150, 0x132}, /* WWW# */
|
||||||
{172, 0x132}, /* HOMEPAGE */
|
{172, 0x132}, /* HOMEPAGE */
|
||||||
{634, 0x137}, /* SELECTIVE_SCREENSHOT# => SysRq */
|
|
||||||
{138, 0x13b}, /* HELP# */
|
{138, 0x13b}, /* HELP# */
|
||||||
{213, 0x13c}, /* SOUND# => My Music/Office Home */
|
{213, 0x13c}, /* SOUND# => My Music/Office Home */
|
||||||
{360, 0x13c}, /* VENDOR# => My Music/Office Home */
|
{360, 0x13c}, /* VENDOR# => My Music/Office Home */
|
||||||
|
@@ -931,6 +931,16 @@ MainWindow::processKeyboardInput(bool down, uint32_t keycode)
|
|||||||
|
|
||||||
/* Apply special cases. */
|
/* Apply special cases. */
|
||||||
switch (keycode) {
|
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 */
|
case 0x11d: /* Right Ctrl */
|
||||||
if (rctrl_is_lalt)
|
if (rctrl_is_lalt)
|
||||||
keycode = 0x38; /* map to Left Alt */
|
keycode = 0x38; /* map to Left Alt */
|
||||||
|
Reference in New Issue
Block a user