From 0406fa8a8ae689ea13f9161dc9c53efbb562361c Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Tue, 10 Jul 2018 19:51:58 +0700 Subject: [PATCH] Fixing issue with kb --- kb/kb.go | 4 ++++ 1 file changed, 4 insertions(+) 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 }