[PATCH wayland-protocols v5 2/2] Add keyboard shortcuts inhibitor
Olivier Fourdan
ofourdan at redhat.com
Tue Jun 6 07:21:12 UTC 2017
Hey Peter,
[...]
> > + </description>
> > + </event>
> > +
> > + <event name="key_combo_start">
> > + <description summary="Start of a key combo sequence definition">
> > + This event indicates the beginning of keyboard combo definition.
>
> typo: "of *a* keyboard combo definition". Having said that, my gut tells me
> this approach is a bad idea (though I'm not 100% sure how else to solve it).
>
> First problem: you have to define modifier behaviour for that keyboard
> combo, because ctl+alt+L is the same as alt+ctrl+l, right? And that's
> handled by the modifier + key event approach. But a screen/emacs-like
> C-a C-x or something like that, how would you do that?
We discussed that some time ago on irc with Jonas and Quentin and the idea of passing a "fake" event sequence seemed to be the most flexible option.
https://people.freedesktop.org/~cbrill/dri-log/index.php?channel=wayland&date=2017-05-05
The idea is to send the key events as they would occur within a start/end marker that tells the client that this isn't for real.
We also thought of "emacs" style key combo and that mechanism allows for such keyboard sequence as well, precisely because it sends the events as they would occur, so pretty much anything is possible.
Granted, that puts the burden on clients that need to "parse" those events and translate these into something either printable on screen (as a tooltip for example) and/or reusable in the client itself, but there is no "standard" way to describe key combo anyway...
> Afaict, you're also allowing yourself only one combination here? Which is
> probably good enough, but still...
*if* the compositor uses a special key combo, it must advertise it, but there is no obligation for the compositor to actually offer a way to disable an active inhibitor, nor to use a keyboard shortcut for that purpose (even though this might be the safest option, as the pointer might be restricted using the locking mechanism)
> But you're definitely restricting yourself to a specific key combination
> rather than, say: "bump the top of the screen, wait for the dock to come
> down, then click on button X" which is used by browsers/video players in
> full-screen. Or "wobble the mouse really fast", or something like that.
The compositor is free to use any mechanism it wants, there is no obligation to use a key combo, but we need to consider that the pointer might be locked preventing the mouse from being used as a de-inhibitor :)
> But most importantly, the client doesn't need to care what the magic
> sequence is because it has no control for it anyway. Maybe the solution is
> to send a UTF8 string intended for display by the client. That way you can
> have "switch your webcam on and do the macarena" as escape sequence too.
I am not sure all clients would agree on the string used to describe the keyboard shortcut, that doesn't seem very useful either imho.
> Sorry, should've pointed that out earlier, but you know how it is.
Cheers
Olivier
More information about the wayland-devel
mailing list