mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/xkb: fix duplicate edit events for special keys
Edit events were being sent twice, once upon key press and again on key release for special keys such as Enter, Arrow keys etc, which resulted in duplicate inputs while pressing these keys. key.EditEvents for special keys now fire once on key press only. Signed-off-by: Rajiv Kanchan <rajiivkanchan@gmail.com>
This commit is contained in:
committed by
Elias Naur
parent
8b5c0d8b0c
commit
e84a2344cf
@@ -170,7 +170,9 @@ func (x *Context) DispatchKey(keyCode uint32, state key.State) (events []event.E
|
||||
if sym == C.XKB_KEY_ISO_Left_Tab {
|
||||
cmd.Modifiers |= key.ModShift
|
||||
}
|
||||
events = append(events, cmd)
|
||||
if state == key.Press {
|
||||
events = append(events, cmd)
|
||||
}
|
||||
}
|
||||
C.xkb_compose_state_feed(x.compState, sym)
|
||||
var str []byte
|
||||
|
||||
Reference in New Issue
Block a user