Add autotype delay to account for focus shift
This commit is contained in:
parent
f68a4710b4
commit
905a09cce7
1 changed files with 1 additions and 3 deletions
|
|
@ -48,6 +48,7 @@ func TypeString(textToType string, layout string) {
|
||||||
state = 2
|
state = 2
|
||||||
} else if state == 2 {
|
} else if state == 2 {
|
||||||
state = 3
|
state = 3
|
||||||
|
time.Sleep(200 * time.Millisecond)
|
||||||
for _, char := range textToType {
|
for _, char := range textToType {
|
||||||
if char == '\t' {
|
if char == '\t' {
|
||||||
obj.Call("org.freedesktop.portal.RemoteDesktop.NotifyKeyboardKeycode", 0, sessionHandle, map[string]dbus.Variant{}, 15, uint32(1))
|
obj.Call("org.freedesktop.portal.RemoteDesktop.NotifyKeyboardKeycode", 0, sessionHandle, map[string]dbus.Variant{}, 15, uint32(1))
|
||||||
|
|
@ -63,9 +64,6 @@ func TypeString(textToType string, layout string) {
|
||||||
}
|
}
|
||||||
bus.Close()
|
bus.Close()
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
fmt.Println("state", state)
|
|
||||||
fmt.Println("Message:", message)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue