mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
add more key listen
This commit is contained in:
parent
0feb5ee1b1
commit
aa247025d2
27
robotgo.go
27
robotgo.go
@ -62,7 +62,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
version string = "v0.47.0.472, Mount Cook!"
|
||||
version string = "v0.47.0.476, Mount Cook!"
|
||||
)
|
||||
|
||||
type (
|
||||
@ -1052,12 +1052,31 @@ func AddEvent(aeve string) int {
|
||||
"f10": "68",
|
||||
"f11": "69",
|
||||
"f12": "70",
|
||||
// more
|
||||
"tab": "15",
|
||||
"ctrl": "29",
|
||||
"control": "29",
|
||||
"alt": "56",
|
||||
"shift": "42",
|
||||
"enter": "28",
|
||||
"command": "3675",
|
||||
}
|
||||
|
||||
var cs *C.char
|
||||
var keve string
|
||||
var (
|
||||
cs *C.char
|
||||
keve string
|
||||
mArr = []string{"mleft", "mright", "wheelDown",
|
||||
"wheelUp", "wheelLeft", "wheelRight"}
|
||||
mouseBool bool
|
||||
)
|
||||
|
||||
if len(aeve) > 1 && len(aeve) < 4 {
|
||||
for i := 0; i < len(mArr); i++ {
|
||||
if aeve == mArr[i] {
|
||||
mouseBool = true
|
||||
}
|
||||
}
|
||||
|
||||
if len(aeve) > 1 && !mouseBool {
|
||||
keve = keycode[aeve].(string)
|
||||
cs = C.CString(keve)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user