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
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now