diff --git a/kb/kb.go b/kb/kb.go index efe189b..a8d2630 100644 --- a/kb/kb.go +++ b/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 }