Fixing issue with kb
This commit is contained in:
parent
db9a873141
commit
0406fa8a8a
4
kb/kb.go
4
kb/kb.go
|
@ -5,6 +5,7 @@ package kb
|
|||
//go:generate go run gen.go -out keys.go -pkg kb
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"unicode"
|
||||
|
||||
"github.com/chromedp/cdproto/input"
|
||||
|
@ -97,6 +98,9 @@ func Encode(r rune) []*input.DispatchKeyEventParams {
|
|||
NativeVirtualKeyCode: v.Native,
|
||||
WindowsVirtualKeyCode: v.Windows,
|
||||
}
|
||||
if runtime.GOOS == "darwin" {
|
||||
keyDown.NativeVirtualKeyCode = 0
|
||||
}
|
||||
if v.Shift {
|
||||
keyDown.Modifiers |= input.ModifierShift
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user