Airbuspilot Posted November 27, 2023 Report Posted November 27, 2023 Hello, in my Script, i need to detect the Press of specific Keys and do some Action, if the Key is pressed. I tried with this one: if ipc.keypressplus(104,8) == 0 then .......... If detected, that NumPad 8 is pressed and released the Script will send some Instructions to the Plane. But unfortunately that does'nt work. Could you please offer a Solution for it? Thanks in Advance, Joachim
John Dowson Posted November 27, 2023 Report Posted November 27, 2023 42 minutes ago, Airbuspilot said: in my Script, i need to detect the Press of specific Keys and do some Action, if the Key is pressed. I tried with this one: if ipc.keypressplus(104,8) == 0 then .......... ipc.keypressplus( (and ipc.keypress) send keys to the FS, as it says in the documentation. You cannot use those functions to test for a keypress. They also do not return any value. Use event.key - see the Lua Library documentation in how to use this function. John
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now