import (
"github.com/micmonay/keybd_event"
)
kb,err := keybd_event.NewKeyBonding()
if err!=nil {
panic(err)
}
// For linux, it is very important wait 2 seconds
if runtime.GOOS == "linux" {
time.Sleep(2 * time.Second)
}
kb.SetKeys(keybd_event.VK_A,keybd_event.VK_B) //set keys
kb.HasSHIFT(true) //set shif is pressed
err = kb.Launching() //launch
if err!=nil {
panic(err)
}
//Ouput : AB
forked from micmonay/keybd_event
-
Notifications
You must be signed in to change notification settings - Fork 0
For simulate key press in Linux, Windows and Mac in golang
License
themihai/keybd_event
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
For simulate key press in Linux, Windows and Mac in golang
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Go 100.0%