X11: Reduce delay when mapping new keys

Reliability is improved by XSync
This commit is contained in:
Unrud 2026-08-03 00:32:34 +02:00
parent f80b1d6ef7
commit 5e68074781

View file

@ -45,7 +45,7 @@ import (
)
const (
keyboardMappingDelay time.Duration = 500 * time.Millisecond
keyboardMappingDelay time.Duration = 200 * time.Millisecond
scrollDiv int = 20
)
@ -273,8 +273,6 @@ func (p *x11Controller) keyboardKeys(keys []Keysym) error {
}
keycode = emptyKeycode
p.changeKeyMappingLocked(keycode, keysymsPerKeycode, keysym)
// race condition!
time.Sleep(keyboardMappingDelay)
} else {
pressMods = mods & ^activeMods
releaseMods = activeMods & ^mods