4 ms·
Sounds like a bad API. There should be a way to register shortcuts and macros without giving keystroke information to the app.
by soulofmischief 7y ago
Sounds like a bad API. There should be a way to register shortcuts and macros without giving keystroke information to the app.
- lexicality 7y agoEspecially given Apple apps seem to be able to register keyboard shortcuts in the system preferences and let you change them...
- kitsunesoba 7y agoThat works through the menu system, so any app that uses the standard menubar can have shortcuts reassigned. It works well, but it comes with the downside that the shortcuts are not global.
- tryptophan 7y agoDoesn't linux work like this? Where certain input starts at the top (kernel), and then goes to the first program that "listens" for a certain key/combo? So you could have a program only listen/capture certain keys?
- jankotek 7y agoXWin app can listen to all keystrokes in system. This was fixed in Wayland.
- sam_lowry_ 7y ago"fixed".
- capableweb 7y agoHow would you write an application that uses global shortcuts in Wayland?
- ubercow13 7y agoProbably through a series of incompatible and as-yet-unimplemented APIs for each desktop environment and window manager you want to support.
- krageon 7y agoYou wouldn't, because Wayland is not ready for consumption by people that use their computer with expectations of full functionality. The obvious things for most people (shortcuts being one of them) do not yet work in it.
- tryptophan 7y agoI know that an Xapp can listen to everything, but I was thinking that it can listen to only some keys/combos.
- adrianmonk 7y agoTwo different questions. You're talking about whether the app must get the user's approval. The question here (in this part of the thread) is whether the app must subscribe to all events and filter them itself or if it can instead subscribe to a filtered version of events.
- gnachman 7y agoCarbon hotkeys are how you register for a single keystroke. Event taps give you everything. This sounds more like the latter.
- xg15 7y agoIf we're at API design, I'd like an even more abstract one: Let the app register intents with associated title, description, icon and suggestion for a keyboard shortcut and let the OS manage how the intent is invoked.