* [Qemu-devel] Command-line option to change ungrab key(s) @ 2017-11-13 14:29 Programmingkid 2017-11-13 14:31 ` Peter Maydell 2017-11-13 14:50 ` Daniel P. Berrange 0 siblings, 2 replies; 8+ messages in thread From: Programmingkid @ 2017-11-13 14:29 UTC (permalink / raw) To: Peter Maydell; +Cc: QEMU Developers Would you accept a patch that allows the user to change the mouse ungrab key(s) in QEMU? It would look something like this: -ungrab <key> or -ungrab <key>,<key>,... If the user wanted the F19 key to be the ungrab key, this is what would be sent to QEMU: -ungrab F19 If the user wanted F16 and F17 held down to ungrab the mouse, this is what would be sent to QEMU: -ungrab F16,F17 Would this feature be something you would consider adding to QEMU? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Command-line option to change ungrab key(s) 2017-11-13 14:29 [Qemu-devel] Command-line option to change ungrab key(s) Programmingkid @ 2017-11-13 14:31 ` Peter Maydell 2017-11-13 14:50 ` Daniel P. Berrange 1 sibling, 0 replies; 8+ messages in thread From: Peter Maydell @ 2017-11-13 14:31 UTC (permalink / raw) To: Programmingkid; +Cc: QEMU Developers, Gerd Hoffmann On 13 November 2017 at 14:29, Programmingkid <programmingkidx@gmail.com> wrote: > Would you accept a patch that allows the user to change the mouse ungrab key(s) in QEMU? > > It would look something like this: > > -ungrab <key> > > or > > -ungrab <key>,<key>,... > > If the user wanted the F19 key to be the ungrab key, this is what would be sent to QEMU: > > -ungrab F19 > > If the user wanted F16 and F17 held down to ungrab the mouse, this is what would be sent to QEMU: > > -ungrab F16,F17 > > > Would this feature be something you would consider adding to QEMU? Gerd is the graphics/UI overall maintainer, that kind of thing would be his decision. thanks -- PMM ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Command-line option to change ungrab key(s) 2017-11-13 14:29 [Qemu-devel] Command-line option to change ungrab key(s) Programmingkid 2017-11-13 14:31 ` Peter Maydell @ 2017-11-13 14:50 ` Daniel P. Berrange 2017-11-13 15:20 ` Marc-André Lureau 1 sibling, 1 reply; 8+ messages in thread From: Daniel P. Berrange @ 2017-11-13 14:50 UTC (permalink / raw) To: Programmingkid; +Cc: Peter Maydell, QEMU Developers On Mon, Nov 13, 2017 at 09:29:25AM -0500, Programmingkid wrote: > Would you accept a patch that allows the user to change the mouse ungrab key(s) in QEMU? > > It would look something like this: > > -ungrab <key> > > or > > -ungrab <key>,<key>,... > > If the user wanted the F19 key to be the ungrab key, this is what would be sent to QEMU: > > -ungrab F19 > > If the user wanted F16 and F17 held down to ungrab the mouse, this is what would be sent to QEMU: > > -ungrab F16,F17 > > > Would this feature be something you would consider adding to QEMU? As context, virt-manager allows customization for the ungrab sequence, and so do spice-gtk/gtk-vnc at the API level. So conceptually I think it is reasonable for any UI console that is intended as more than just a toy. 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 :| ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Command-line option to change ungrab key(s) 2017-11-13 14:50 ` Daniel P. Berrange @ 2017-11-13 15:20 ` Marc-André Lureau 2017-11-13 15:27 ` Programmingkid 0 siblings, 1 reply; 8+ messages in thread From: Marc-André Lureau @ 2017-11-13 15:20 UTC (permalink / raw) To: Daniel P. Berrange; +Cc: Programmingkid, Peter Maydell, QEMU Developers Hi On Mon, Nov 13, 2017 at 3:50 PM, Daniel P. Berrange <berrange@redhat.com> wrote: > On Mon, Nov 13, 2017 at 09:29:25AM -0500, Programmingkid wrote: >> Would you accept a patch that allows the user to change the mouse ungrab key(s) in QEMU? >> >> It would look something like this: >> >> -ungrab <key> >> >> or >> >> -ungrab <key>,<key>,... >> >> If the user wanted the F19 key to be the ungrab key, this is what would be sent to QEMU: >> >> -ungrab F19 >> >> If the user wanted F16 and F17 held down to ungrab the mouse, this is what would be sent to QEMU: >> >> -ungrab F16,F17 >> >> >> Would this feature be something you would consider adding to QEMU? > > As context, virt-manager allows customization for the ungrab sequence, and > so do spice-gtk/gtk-vnc at the API level. So conceptually I think it is > reasonable for any UI console that is intended as more than just a toy. Would it make sense to share the virt-viewer/remote-viewer --hotkeys option format ? (see man remote-viewer / virt-viewer) -- Marc-André Lureau ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Command-line option to change ungrab key(s) 2017-11-13 15:20 ` Marc-André Lureau @ 2017-11-13 15:27 ` Programmingkid 2017-11-14 7:21 ` Gerd Hoffmann 0 siblings, 1 reply; 8+ messages in thread From: Programmingkid @ 2017-11-13 15:27 UTC (permalink / raw) To: Marc-André Lureau, Gerd Hoffmann Cc: Daniel P. Berrange, Peter Maydell, QEMU Developers > On Nov 13, 2017, at 10:20 AM, Marc-André Lureau <marcandre.lureau@gmail.com> wrote: > > Hi > > On Mon, Nov 13, 2017 at 3:50 PM, Daniel P. Berrange <berrange@redhat.com> wrote: >> On Mon, Nov 13, 2017 at 09:29:25AM -0500, Programmingkid wrote: >>> Would you accept a patch that allows the user to change the mouse ungrab key(s) in QEMU? >>> >>> It would look something like this: >>> >>> -ungrab <key> >>> >>> or >>> >>> -ungrab <key>,<key>,... >>> >>> If the user wanted the F19 key to be the ungrab key, this is what would be sent to QEMU: >>> >>> -ungrab F19 >>> >>> If the user wanted F16 and F17 held down to ungrab the mouse, this is what would be sent to QEMU: >>> >>> -ungrab F16,F17 >>> >>> >>> Would this feature be something you would consider adding to QEMU? >> >> As context, virt-manager allows customization for the ungrab sequence, and >> so do spice-gtk/gtk-vnc at the API level. So conceptually I think it is >> reasonable for any UI console that is intended as more than just a toy. > > Would it make sense to share the virt-viewer/remote-viewer --hotkeys > option format ? (see man remote-viewer / virt-viewer) I think you are referring to information found on this page: https://www.mankier.com/1/remote-viewer The command-line option for changing hotkey actions would be: --hotkeys=<action1>=<key1>[+<key2>][,<action2>=<key3>[+<key4>]] So this means changing the mouse ungrab would look something like this: --hotkeys=release-cursor=F19 (or some other key) Gerd what you think of this idea? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Command-line option to change ungrab key(s) 2017-11-13 15:27 ` Programmingkid @ 2017-11-14 7:21 ` Gerd Hoffmann 2017-11-14 13:47 ` Programmingkid 0 siblings, 1 reply; 8+ messages in thread From: Gerd Hoffmann @ 2017-11-14 7:21 UTC (permalink / raw) To: Programmingkid Cc: Marc-André Lureau, Daniel P. Berrange, Peter Maydell, QEMU Developers Hi, > >>> Would this feature be something you would consider adding to QEMU? > >> > >> As context, virt-manager allows customization for the ungrab sequence, and > >> so do spice-gtk/gtk-vnc at the API level. So conceptually I think it is > >> reasonable for any UI console that is intended as more than just a toy. > > > > Would it make sense to share the virt-viewer/remote-viewer --hotkeys > > option format ? (see man remote-viewer / virt-viewer) > > I think you are referring to information found on this page: https://www.mankier.com/1/remote-viewer > > The command-line option for changing hotkey actions would be: > --hotkeys=<action1>=<key1>[+<key2>][,<action2>=<key3>[+<key4>]] > > So this means changing the mouse ungrab would look something like this: > > --hotkeys=release-cursor=F19 (or some other key) > > Gerd what you think of this idea? Certainly not this way. The display configuration we have right now is pretty messy already. I want clean this up (draft patch series at https://www.kraxel.org/cgit/qemu/log/?h=lupin/display-cmdline), and this should be done before adding new stuff. Also when making this configurable it should be consistent across all user interfaces we have, which surely is a non-trivial amount of work. cheers, Gerd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Command-line option to change ungrab key(s) 2017-11-14 7:21 ` Gerd Hoffmann @ 2017-11-14 13:47 ` Programmingkid 2017-11-14 14:00 ` Gerd Hoffmann 0 siblings, 1 reply; 8+ messages in thread From: Programmingkid @ 2017-11-14 13:47 UTC (permalink / raw) To: Gerd Hoffmann Cc: Marc-André Lureau, Daniel P. Berrange, Peter Maydell, QEMU Developers > On Nov 14, 2017, at 2:21 AM, Gerd Hoffmann <kraxel@redhat.com> wrote: > > Hi, > >>>>> Would this feature be something you would consider adding to QEMU? >>>> >>>> As context, virt-manager allows customization for the ungrab sequence, and >>>> so do spice-gtk/gtk-vnc at the API level. So conceptually I think it is >>>> reasonable for any UI console that is intended as more than just a toy. >>> >>> Would it make sense to share the virt-viewer/remote-viewer --hotkeys >>> option format ? (see man remote-viewer / virt-viewer) >> >> I think you are referring to information found on this page: https://www.mankier.com/1/remote-viewer >> >> The command-line option for changing hotkey actions would be: >> --hotkeys=<action1>=<key1>[+<key2>][,<action2>=<key3>[+<key4>]] >> >> So this means changing the mouse ungrab would look something like this: >> >> --hotkeys=release-cursor=F19 (or some other key) >> >> Gerd what you think of this idea? > > Certainly not this way. Did you have an idea on how something like this should look like? This feature would only change the old mouse ungrab keys to a user-specified one. So the basic algorithm would be change the text that displays at the top of the QEMU window to say (Press <user specified key(s)> to release mouse. Then tell the code that looks for the ungrab keys which keys to look out for. > The display configuration we have right now is > pretty messy already. I want clean this up (draft patch series at > https://www.kraxel.org/cgit/qemu/log/?h=lupin/display-cmdline), and this > should be done before adding new stuff. My original idea was to make a patch that would only change the cocoa.m file. I'm thinking you want this code to be elsewhere. Somewhere where other UI code like GTK would be able to use. Is that what you prefer? > Also when making this configurable it should be consistent across all > user interfaces we have, which surely is a non-trivial amount of work. I know Cocoa but my lack of GTK experience would not permit me to make a patch for that UI code. When you are done with your display configuration work, would there even be a need to patch the Cocoa/GTK code? I'm under the impression you are trying to consolidate some of the UI code under one file. This does sound like a logic move to make. It would help to keep things consistent across different hosts. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Command-line option to change ungrab key(s) 2017-11-14 13:47 ` Programmingkid @ 2017-11-14 14:00 ` Gerd Hoffmann 0 siblings, 0 replies; 8+ messages in thread From: Gerd Hoffmann @ 2017-11-14 14:00 UTC (permalink / raw) To: Programmingkid Cc: Marc-André Lureau, Daniel P. Berrange, Peter Maydell, QEMU Developers Hi, > > Certainly not this way. > > Did you have an idea on how something like this should look like? This > feature would only change the old mouse ungrab keys to a > user-specified one. So the basic algorithm would be change the text > that displays at the top of the QEMU window to say (Press <user > specified key(s)> to release mouse. That is the easy part ;) > Then tell the code that looks for > the ungrab keys which keys to look out for. Here it becomes more difficuilt. > > The display configuration we have right now is pretty messy > > already. I want clean this up (draft patch series at > > https://www.kraxel.org/cgit/qemu/log/?h=lupin/display-cmdline), and > > this should be done before adding new stuff. > > My original idea was to make a patch that would only change the > cocoa.m file. I'm thinking you want this code to be elsewhere. > Somewhere where other UI code like GTK would be able to use. Is that > what you prefer? Well, at least the command line parsing part should be in common code, yes. Detecting and handling the hotkeys will most likely stay in UI-specific code. > > Also when making this configurable it should be consistent across > > all user interfaces we have, which surely is a non-trivial amount of > > work. > > I know Cocoa but my lack of GTK experience would not permit me to make > a patch for that UI code. When you are done with your display > configuration work, would there even be a need to patch the Cocoa/GTK > code? I'm under the impression you are trying to consolidate some of > the UI code under one file. No. But standardize the interface between UIs and qemu, which will not only standardize the configuration, but should also make it easier to build the UIs as modules. cheers, Gerd ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-11-14 14:01 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-11-13 14:29 [Qemu-devel] Command-line option to change ungrab key(s) Programmingkid 2017-11-13 14:31 ` Peter Maydell 2017-11-13 14:50 ` Daniel P. Berrange 2017-11-13 15:20 ` Marc-André Lureau 2017-11-13 15:27 ` Programmingkid 2017-11-14 7:21 ` Gerd Hoffmann 2017-11-14 13:47 ` Programmingkid 2017-11-14 14:00 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).