input-linux: add shift+shift as a grab toggle

We have ctrl-ctrl and alt-alt; why not shift-shift? That's my preferred
grab binding, personally.

Signed-off-by: Niklas Haas <git@haasn.xyz>
Message-id: 20190818105038.19520-1-qemu@haasn.xyz
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Niklas Haas 2019-08-18 12:50:38 +02:00 committed by Gerd Hoffmann
parent 68097ed5e5
commit a923b471fc
2 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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];