mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/xkb: fix events sent when modifier keys are pressed
When modifier keys are active DispatchKey should not send a
key.EditEvent for the key that was pressed. For example when pressing
Ctrl+Alt+e DispatchEvent should not generate a key.EditEvent{Text:"e"}.
Signed-off-by: aarzilli <alessandro.arzilli@gmail.com>
This commit is contained in:
@@ -185,7 +185,10 @@ func (x *Context) DispatchKey(keyCode uint32) (events []event.Event) {
|
||||
C.xkb_compose_state_reset(x.compState)
|
||||
str = x.utf8Buf[:size]
|
||||
case C.XKB_COMPOSE_NOTHING:
|
||||
str = x.charsForKeycode(kc)
|
||||
mod := x.Modifiers()
|
||||
if mod&(key.ModCtrl|key.ModAlt|key.ModSuper) == 0 {
|
||||
str = x.charsForKeycode(kc)
|
||||
}
|
||||
}
|
||||
// Report only printable runes.
|
||||
var n int
|
||||
|
||||
Reference in New Issue
Block a user