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
|
//go:generate go run gen.go -out keys.go -pkg kb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"runtime"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/chromedp/cdproto/input"
|
"github.com/chromedp/cdproto/input"
|
||||||
|
@ -97,6 +98,9 @@ func Encode(r rune) []*input.DispatchKeyEventParams {
|
||||||
NativeVirtualKeyCode: v.Native,
|
NativeVirtualKeyCode: v.Native,
|
||||||
WindowsVirtualKeyCode: v.Windows,
|
WindowsVirtualKeyCode: v.Windows,
|
||||||
}
|
}
|
||||||
|
if runtime.GOOS == "darwin" {
|
||||||
|
keyDown.NativeVirtualKeyCode = 0
|
||||||
|
}
|
||||||
if v.Shift {
|
if v.Shift {
|
||||||
keyDown.Modifiers |= input.ModifierShift
|
keyDown.Modifiers |= input.ModifierShift
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user