enforce delay and add delay to keymap
This commit is contained in:
parent
02aa4cd6c2
commit
39176aac3c
@ -89,7 +89,9 @@ func write(p []byte) (n int, err error) {
|
||||
var (
|
||||
mod byte
|
||||
)
|
||||
|
||||
if DefaultDelay > 0 && i > 2 {
|
||||
break
|
||||
}
|
||||
r, s = utf8.DecodeRune(p[index:])
|
||||
if r == utf8.RuneError {
|
||||
return index, fmt.Errorf("invalid rune: 0x%X", p[index]) // This probably screws things up if the last rune in 'p' is incomplete
|
||||
@ -173,6 +175,7 @@ func delay() {
|
||||
|
||||
func Press(press [8]byte, file io.Writer) {
|
||||
file.Write(press[:])
|
||||
time.Sleep(DefaultDelay)
|
||||
file.Write([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
|
||||
}
|
||||
|
||||
|
@ -386,5 +386,10 @@
|
||||
" ": {
|
||||
"modifier": ["NONE"],
|
||||
"decimal": 44
|
||||
},
|
||||
"⏲": {
|
||||
"modifier": ["NONE"],
|
||||
"decimal": 0,
|
||||
"delayDelimiter": true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user