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

How do I get it to press one key, wait and then hold another? #952

Open
SmurgBurglar opened this issue Sep 9, 2024 · 1 comment
Open

Comments

@SmurgBurglar
Copy link

SmurgBurglar commented Sep 9, 2024

I need it to press 0, wait, then hold 5 for as long as I hold it, but nothing I have tried has worked, for example "hold_keys(0).w(10).hold_keys(5)" using the wait option just stalls the script at hold_keys(0) and keeps hold_keys(5) from working.

@TherinS
Copy link

TherinS commented Sep 26, 2024

As-is, the macro does this for me:
I hold down the remapped key and I get a line of "0" printed out untill I release the key. After releasing that key, there is a delay equal to the duration in the wait part, and then it prints the "5" once. It looks like this on a document:
000000000(insert delay here)5

What I think you are asking for is for a macro that enters something along the lines of:
0(delay)55555555555 <-until key is released.

Is that correct? In that case, try removing the first instance of "hold_keys" and just make it:
key(0).w(10).hold_keys(5)

I tested it using a blank text document to see what it was printing and using a much longer delay (2 seconds = 2000) so I could be sure the delay was working.

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

2 participants