Skip to content

Commit 2d48324

Browse files
committed
Keyboard sleep 100ms
1 parent ed15adc commit 2d48324

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/devices/keyboard/handler.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ import (
1212

1313
var KeyboardEnabled = new(devices.DeviceEnabled).Disable()
1414

15-
func HandleKeyboard(d *webrtc.DataChannel) error {
15+
func HandleKeyboard(d *webrtc.DataChannel) {
1616

1717
if d.Label() != "keyboard" {
18-
return nil
18+
return
1919
}
2020

2121
d.OnOpen(func() {
22+
23+
robotgo.KeySleep = 100
24+
2225
log.Println("keyboard data channel is open")
26+
2327
})
2428

2529
keyState := make(map[string]bool)
@@ -76,6 +80,4 @@ func HandleKeyboard(d *webrtc.DataChannel) error {
7680

7781
})
7882

79-
return nil
80-
8183
}

0 commit comments

Comments
 (0)