X11: Reduce delay when mapping new keys
Reliability is improved by XSync
This commit is contained in:
parent
f80b1d6ef7
commit
5e68074781
1 changed files with 1 additions and 3 deletions
|
|
@ -45,7 +45,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
keyboardMappingDelay time.Duration = 500 * time.Millisecond
|
keyboardMappingDelay time.Duration = 200 * time.Millisecond
|
||||||
scrollDiv int = 20
|
scrollDiv int = 20
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -273,8 +273,6 @@ func (p *x11Controller) keyboardKeys(keys []Keysym) error {
|
||||||
}
|
}
|
||||||
keycode = emptyKeycode
|
keycode = emptyKeycode
|
||||||
p.changeKeyMappingLocked(keycode, keysymsPerKeycode, keysym)
|
p.changeKeyMappingLocked(keycode, keysymsPerKeycode, keysym)
|
||||||
// race condition!
|
|
||||||
time.Sleep(keyboardMappingDelay)
|
|
||||||
} else {
|
} else {
|
||||||
pressMods = mods & ^activeMods
|
pressMods = mods & ^activeMods
|
||||||
releaseMods = activeMods & ^mods
|
releaseMods = activeMods & ^mods
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue