Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to press and Hold key for x amount of seconds? #699

Open
1 of 3 tasks
kennethgargan opened this issue Nov 13, 2024 · 0 comments
Open
1 of 3 tasks

Is it possible to press and Hold key for x amount of seconds? #699

kennethgargan opened this issue Nov 13, 2024 · 0 comments

Comments

@kennethgargan
Copy link

  • Robotgo version (or commit ref): v0.110.5 (v1.0.0-rc4)
  • Go version: go1.21.2
  • Gcc version: 13.2.0
  • Operating system and bit: Windows 10 - 64 bit
  • Resolution: N/A
  • Can you reproduce the bug at Examples:
    • Yes (provide example code)
    • No
    • Not relevant
  • Provide example code:
package main

import (
	"fmt"

	"github.com/go-vgo/robotgo"
)

func main() {
	fmt.Println("Pressing a for 3 seconds")
	robotgo.KeyDown("a")
	robotgo.Sleep(3)
	robotgo.KeyUp("a")
}
  • Log gist:

Description

Hi, Is it possible to have it so I can press a key down for a certain amount of seconds? In the example code, I want to press a for 3 seconds before releasing the key but it doesn't seem to work.
Is there any way to go about doing this in RobotGo?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant