ui: drop altgr and altgr_r QKeyCodes
PATCH 1/1 ui: drop altgr and altgr_r QKeyCodes
The right alt key (alt_r aka KEY_RIGHTALT) is used for AltGr. The altgr and altgr_r keys simply don't exist. Drop them.
Signed-off-by Gerd Hoffmann <[email protected]>
--- hw/char/escc.c | 1 - hw/input/adb.c | 1 - hw/input/ps2.c | 2 -- ui/input-keymap.c | 2 -- qapi-schema.json | 3 ++- 5 files changed, 2 insertions(+), 7 deletions(-)
hw/char/escc.c +0 -1
@@ -722,7 +722,6 @@ static const uint8_t qcode_to_keycode[Q_KEY_CODE__MAX] = { [Q_KEY_CODE_SHIFT_R] = 110, [Q_KEY_CODE_ALT] = 19, [Q_KEY_CODE_ALT_R] = 13, - [Q_KEY_CODE_ALTGR] = 13, [Q_KEY_CODE_CTRL] = 76, [Q_KEY_CODE_CTRL_R] = 76, [Q_KEY_CODE_ESC] = 29,
hw/input/adb.c +0 -1
@@ -201,7 +201,6 @@ int qcode_to_adb_keycode[] = { [Q_KEY_CODE_SHIFT_R] = ADB_KEY_RIGHT_SHIFT, [Q_KEY_CODE_ALT] = ADB_KEY_LEFT_OPTION, [Q_KEY_CODE_ALT_R] = ADB_KEY_RIGHT_OPTION, - [Q_KEY_CODE_ALTGR] = ADB_KEY_RIGHT_OPTION, [Q_KEY_CODE_CTRL] = ADB_KEY_LEFT_CONTROL, [Q_KEY_CODE_CTRL_R] = ADB_KEY_RIGHT_CONTROL, [Q_KEY_CODE_META_L] = ADB_KEY_COMMAND,
hw/input/ps2.c +0 -2
@@ -387,8 +387,6 @@ static const uint16_t qcode_to_keycode_set2[Q_KEY_CODE__MAX] = { [Q_KEY_CODE_AC_REFRESH] = 0xe020, [Q_KEY_CODE_AC_BOOKMARKS] = 0xe018, - [Q_KEY_CODE_ALTGR] = 0x08, - [Q_KEY_CODE_ALTGR_R] = 0xe008, [Q_KEY_CODE_ASTERISK] = 0x7c, [Q_KEY_CODE_LESS] = 0x61, [Q_KEY_CODE_SYSRQ] = 0x7f,
ui/input-keymap.c +0 -2
@@ -146,8 +146,6 @@ static const int qcode_to_number[] = { [Q_KEY_CODE_ALT] = 0x38, [Q_KEY_CODE_ALT_R] = 0xb8, - [Q_KEY_CODE_ALTGR] = 0x64, - [Q_KEY_CODE_ALTGR_R] = 0xe4, [Q_KEY_CODE_CTRL] = 0x1d, [Q_KEY_CODE_CTRL_R] = 0x9d,
qapi-schema.json +2 -1
@@ -4863,13 +4863,14 @@ # @ac_stop: since 2.10 # @ac_refresh: since 2.10 # @ac_bookmarks: since 2.10 +# altgr, altgr_r: dropped in 2.10 # # Since: 1.3.0 # ## { 'enum': 'QKeyCode', 'data': [ 'unmapped', - 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl', + 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl', 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
Signature · 1 line
2.9.3
qapi-schema.json line 4867
Quoted 13 lines · Gerd Hoffmann
The right alt key (
alt_rakaKEY_RIGHTALT) is used for AltGr. The altgr andaltgr_rkeys simply don't exist. Drop them.Signed-off-by Gerd Hoffmann <[email protected]>---
+++
b/qapi-schema.jsonqapi-schema.json +1
-0@@ -4863,13 +4863,14 @@ # @ac_stop: since 2.10 # @ac_refresh: since 2.10 # @ac_bookmarks: since 2.10 +# altgr, altgr_r: dropped in 2.10 #
Dropping members is unusual; it may break unsuspecting clients relying on the names - but the argument is that the keys don't exist, so no one can have been relying on the name to do anything meaningful.
Reviewed-by Eric Blake <[email protected]>
and worth inclusion in 2.10
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org