mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
io/key: [API] implement key event propagation
Before this change, every Event would be passed to the focused InputOp tag, making it impossible to implement, say, program-wide shortcuts. This change implements key.Event routing similar to how pointer.Events are routed: every InputOp describes the set of keys it can handle, and the router use that information to deliver an Event to the matching handler. This is an API change, because every InputOp must now include a filter matching the keys it wants to handle. Fixes: https://todo.sr.ht/~eliasnaur/gio/395 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+6
-2
@@ -5,6 +5,10 @@
|
||||
|
||||
package key
|
||||
|
||||
// ModShortcut is the platform's shortcut modifier, usually the Ctrl
|
||||
// key. On Apple platforms it is the Cmd key.
|
||||
// ModShortcut is the platform's shortcut modifier, usually the ctrl
|
||||
// modifier. On Apple platforms it is the cmd key.
|
||||
const ModShortcut = ModCtrl
|
||||
|
||||
// ModShortcutAlt is the platform's alternative shortcut modifier,
|
||||
// usually the ctrl modifier. On Apple platforms it is the alt modifier.
|
||||
const ModShortcutAlt = ModCtrl
|
||||
|
||||
Reference in New Issue
Block a user