mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
update key examples code
This commit is contained in:
parent
a4a4d26f62
commit
43958d71e2
@ -51,12 +51,14 @@ func keyTap() {
|
|||||||
|
|
||||||
// press "i", "alt", "command" Key combination
|
// press "i", "alt", "command" Key combination
|
||||||
robotgo.KeyTap("i", "alt", "command")
|
robotgo.KeyTap("i", "alt", "command")
|
||||||
robotgo.KeyTap("i", "alt", "command", 11)
|
robotgo.KeyTap("i", "alt", "cmd", 11)
|
||||||
|
|
||||||
arr := []string{"alt", "cmd"}
|
arr := []string{"alt", "cmd"}
|
||||||
robotgo.KeyTap("i", arr)
|
robotgo.KeyTap("i", arr)
|
||||||
robotgo.KeyTap("i", arr, 12)
|
robotgo.KeyTap("i", arr, 12)
|
||||||
|
|
||||||
|
robotgo.KeyTap("i", "cmd", " alt", "shift")
|
||||||
|
|
||||||
// close window
|
// close window
|
||||||
robotgo.KeyTap("w", "cmd")
|
robotgo.KeyTap("w", "cmd")
|
||||||
|
|
||||||
@ -70,7 +72,8 @@ func keyTap() {
|
|||||||
func keyToggle() {
|
func keyToggle() {
|
||||||
robotgo.KeyToggle("a", "down")
|
robotgo.KeyToggle("a", "down")
|
||||||
robotgo.KeyToggle("a", "down", "alt")
|
robotgo.KeyToggle("a", "down", "alt")
|
||||||
robotgo.KeyToggle("a", "down", "alt", "cmd")
|
robotgo.KeyToggle("a", "up", "alt", "cmd")
|
||||||
|
robotgo.KeyToggle("q", "up", "alt", "cmd", "shift")
|
||||||
|
|
||||||
err := robotgo.KeyToggle("enter", "down")
|
err := robotgo.KeyToggle("enter", "down")
|
||||||
if err == "" {
|
if err == "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user