diff options
author | Ryan El Kochta <relkochta@gmail.com> | 2019-01-23 16:45:55 -0500 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-24 10:42:38 +0100 |
commit | 2657846fb2e47e8ba847b5ef6fe742466414c745 (patch) | |
tree | 8a49f60a6fadf0d078d1f64f412f0c8b1dc104bf /qapi | |
parent | f6b06fcceef465de0cf2514c9f76fe0192896781 (diff) | |
download | qemu-2657846fb2e47e8ba847b5ef6fe742466414c745.zip qemu-2657846fb2e47e8ba847b5ef6fe742466414c745.tar.gz qemu-2657846fb2e47e8ba847b5ef6fe742466414c745.tar.bz2 |
input-linux: customizable grab toggle keys
This patch adds a new option to the input-linux object:
grab-toggle=[key-combo]
The key combination can be one of the following:
* ctrl-ctrl
* alt-alt
* meta-meta
* scrolllock
* ctrl-scrolllock
The user can pick any of these key combinations. The VM's grab
of the evdev device will be toggled when the key combination is
pressed.
Any invalid setting will result in an error. No setting will
result in the current default of ctrl-ctrl.
The right and left ctrl key both work for Ctrl-Scrolllock.
If scrolllock is selected as one of the grab-toggle keys, it
will be entirely disabled and not passed to the guest at all.
This is to prevent enabling it while attempting to leave or enter
the VM. On the host, scrolllock can be disabled using xmodmap.
First, find the modifier that Scroll_Lock is bound to:
$ xmodmap -pm
Then, remove Scroll_Lock from it, replacing modX with the modifier:
$ xmodmap -e 'remove modX = Scroll_Lock'
If Scroll_Lock is not bound to any modifier, it is already disabled.
To save the changes, add them to your xinitrc.
Ryan El Kochta (1):
input-linux: customizable grab toggle keys v5
Signed-off-by: Ryan El Kochta <relkochta@gmail.com>
Message-id: 20190123214555.12712-2-relkochta@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/ui.json | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qapi/ui.json b/qapi/ui.json index 5ad1324..7d9c4bd 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1016,6 +1016,16 @@ '*head' : 'int', 'events' : [ 'InputEvent' ] } } +## +# @GrabToggleKeys: +# +# Keys to toggle input-linux between host and guest. +# +# Since: 4.0 +# +## +{ 'enum': 'GrabToggleKeys', + 'data': [ 'ctrl-ctrl', 'alt-alt', 'meta-meta', 'scrolllock', 'ctrl-scrolllock' ] } ## # @DisplayGTK: |