diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-08-22 14:16:42 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-08-22 14:16:42 +0100 |
commit | d86766a9d0e5c4d9cfb2186bf0b7a6f0f17e1831 (patch) | |
tree | 867f4f649fd673851a2d8b5609be3a59c97c4289 | |
parent | 810923480863c43ecb22ae124156298385439339 (diff) | |
parent | a923b471fc59389e49575f38f4db3cd622619bf5 (diff) | |
download | qemu-d86766a9d0e5c4d9cfb2186bf0b7a6f0f17e1831.zip |
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190822-pull-request' into staging
curses: assert get_wch return value is okay
input-linux: add shift+shift as a grab toggle
# gpg: Signature made Thu 22 Aug 2019 05:41:44 BST
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/ui-20190822-pull-request:
input-linux: add shift+shift as a grab toggle
curses: assert get_wch return value is okay
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | qapi/ui.json | 3 | ||||
-rw-r--r-- | ui/curses.c | 2 | ||||
-rw-r--r-- | ui/input-linux.c | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/qapi/ui.json b/qapi/ui.json index 59e412139a..e04525d8b4 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1025,7 +1025,8 @@ # ## { 'enum': 'GrabToggleKeys', - 'data': [ 'ctrl-ctrl', 'alt-alt', 'meta-meta', 'scrolllock', 'ctrl-scrolllock' ] } + 'data': [ 'ctrl-ctrl', 'alt-alt', 'shift-shift','meta-meta', 'scrolllock', + 'ctrl-scrolllock' ] } ## # @DisplayGTK: diff --git a/ui/curses.c b/ui/curses.c index a6e260eb96..ec281125ac 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -225,6 +225,8 @@ static wint_t console_getch(enum maybe_keycode *maybe_keycode) case ERR: ret = -1; break; + default: + abort(); } return ret; } diff --git a/ui/input-linux.c b/ui/input-linux.c index 59456fe765..a7b280b25b 100644 --- a/ui/input-linux.c +++ b/ui/input-linux.c @@ -113,6 +113,10 @@ static bool input_linux_check_toggle(InputLinux *il) return il->keydown[KEY_LEFTALT] && il->keydown[KEY_RIGHTALT]; + case GRAB_TOGGLE_KEYS_SHIFT_SHIFT: + return il->keydown[KEY_LEFTSHIFT] && + il->keydown[KEY_RIGHTSHIFT]; + case GRAB_TOGGLE_KEYS_META_META: return il->keydown[KEY_LEFTMETA] && il->keydown[KEY_RIGHTMETA]; |