5 ms·
In my experience most of these use cases are handled on linux by the window manager calling a script that sends a message to the relevant application, e.g. over
by topaz0 5y ago
In my experience most of these use cases are handled on linux by the window manager calling a script that sends a message to the relevant application, e.g. over dbus.
- reificator 5y agoSure, and that works fine. Just let my application tell the window manager: * What key events I care about. (I.E. what the keybind should be named in the settings UI) * What script or message to pass back to me when that event is activated. * What the default keycombo should be, if any.
- michaelmrose 5y agoSome applications prefer to provide a ui for the user to configure a hotkey. This is naturally discoverable within the scope of the other settings in its preferences screen. Providing a cli interface for automation or binding a hotkey is imo more powerful and useful but its not discoverable. Doubly so for a controlling it over dbus. The logical thing is that since there is a substantial use case and a desire to limit applications access to global info is that a permission system ought to have been built into Wayland such that applications could request not only global access to the keyboard but permission to get a notification when a particular key press happened. Since this feature was a staple of desktop operating systems for decades it ought to have been part of the plan from the start.
- zxzax 5y agoPeople have been asking for similar grab-type things since early on in Wayland, and there have been many proposals, but nobody has actually stepped forward to build such a permission system that would work everywhere and would not create additional security problems or would not severely overcomplicate things. It's not a simple thing to do, by any means. If you think you know how, I would urge you to get started designing it and contributing it to some of the major Wayland implementations.
- michaelmrose 5y agoI don't really want to be in the business of growing wheat or baking bread if what I actually want is a sandwich but I will happily explain why ___ sandwich shack is doing it wrong because Monday morning quarterbacking is more fun.
- zxzax 5y agoI get that, but everyone else also seems to have that attitude, so you see why it doesn't really get done when nobody has any wheat or bread :)