Jump to content
The simFlight Network Forums

ipc.keypress question

Recommended Posts

19 minutes ago, cellular55 said:

I need to find a way to simulate a keypress for a specific number of seconds.

Seems that ipc.keypress do not have that kind of option.

Is there a sort of workaround or another method to use in lua?

In the lua library document, look at the entry just below ipc.keypress, called ipc.keypressplus. With that you can hold the keypress as long as you wish.



Link to comment
Share on other sites

2 hours ago, cellular55 said:

thanks a lot.. but I do not undestand where I have to specify the number of seconds

You simply use the function to PRESS the key(s), then use ipc.sleep for whatever time you want, then use the function again to RELEASE the key(s). Sorry, but I thought that didn't need explaining. 😞



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.