mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-04 16:03:54 +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 (
|
const (
|
||||||
version string = "v0.47.0.472, Mount Cook!"
|
version string = "v0.47.0.476, Mount Cook!"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@ -1052,12 +1052,31 @@ func AddEvent(aeve string) int {
|
|||||||
"f10": "68",
|
"f10": "68",
|
||||||
"f11": "69",
|
"f11": "69",
|
||||||
"f12": "70",
|
"f12": "70",
|
||||||
|
// more
|
||||||
|
"tab": "15",
|
||||||
|
"ctrl": "29",
|
||||||
|
"control": "29",
|
||||||
|
"alt": "56",
|
||||||
|
"shift": "42",
|
||||||
|
"enter": "28",
|
||||||
|
"command": "3675",
|
||||||
}
|
}
|
||||||
|
|
||||||
var cs *C.char
|
var (
|
||||||
var keve string
|
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)
|
keve = keycode[aeve].(string)
|
||||||
cs = C.CString(keve)
|
cs = C.CString(keve)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user