Added some functionality to change the key combo for evdev toggle. example: -object input-linux,rhotkey=29,lhotkey=56,evdev=[etc...] Set the defaults to LCTRL and RCTRL if not provided. This is my first patch to anything so feedback/help appreciated! byxk (1): input-linux: provide hotkeys for evdev toggle ui/input-linux.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 2 deletions(-) -- 2.15.1
On Sun, Jan 07, 2018 at 02:14:54PM -0800, byxk wrote: > Added some functionality to change the key combo for evdev toggle. > example: > -object input-linux,rhotkey=29,lhotkey=56,evdev=[etc...] > > Set the defaults to LCTRL and RCTRL if not provided. This should really be part of the commit message for the patch itself, so it gets recorded in git history. There is some overlap here with the grab sequence work John has just posted for cocoa frontend https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg05115.html I wonder if it is reasonable for ui/input-linux.c to honour the same global '-ungrab' configuration option ? If not, we should at least use the same syntax for describing the ungrab sequence. ie a list of key code names, rather than a hardcoded pair of numeric values. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Hi Daniel, thanks for responding. > This should really be part of the commit message for the patch itself, so it > gets recorded in git history. Next patch version I'll separate this out to another commit. > I wonder if it is reasonable for ui/input-linux.c to honour the same > global '-ungrab' configuration option ? I had it as a global config option at first, but realized all config options related to input-linux appears to be contained in it's own object-based args, especially since evdev is still quite niche/isolated in its own way. But I rather not make the decisions for input-linux, I'll leave that up to the maintainer. > If not, we should at least > use the same syntax for describing the ungrab sequence. ie a list of > key code names, rather than a hardcoded pair of numeric values. This make sense, I agree it should at least be consistent. - Patrick (byxk) On Wed, Jan 10, 2018 at 8:30 AM, Daniel P. Berrange <berrange@redhat.com> wrote: > On Sun, Jan 07, 2018 at 02:14:54PM -0800, byxk wrote: > > Added some functionality to change the key combo for evdev toggle. > > example: > > -object input-linux,rhotkey=29,lhotkey=56,evdev=[etc...] > > > > Set the defaults to LCTRL and RCTRL if not provided. > > This should really be part of the commit message for the patch itself, so > it > gets recorded in git history. > > There is some overlap here with the grab sequence work John has just posted > for cocoa frontend > > https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg05115.html > > I wonder if it is reasonable for ui/input-linux.c to honour the same > global '-ungrab' configuration option ? If not, we should at least > use the same syntax for describing the ungrab sequence. ie a list of > key code names, rather than a hardcoded pair of numeric values. > > > Regards, > Daniel > -- > |: https://berrange.com -o- https://www.flickr.com/photos/ > dberrange :| > |: https://libvirt.org -o- > https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- https://www.instagram.com/ > dberrange :| >
Hi, > I wonder if it is reasonable for ui/input-linux.c to honour the same > global '-ungrab' configuration option ? No. Problem here is that input-linux is basically sniffing keyboard input when the host owns the keyboard, so it can't prevent the hotkey being seen by the host. Therefore I picked something which (a) has no side effects (modifier keys only) and (b) is highly unlikely to be used in normal operation. cheers, Gerd
© 2016 - 2025 Red Hat, Inc.