Rick Posted August 30, 2016 Posted August 30, 2016 So the Script has a callback for KeyDown and KeyUp. What is that doing internally and is there a polling way to check this or some way I can check this outside of a Script callback? I have my own Lua class and need to check for a key down and hoping to avoid looping over all the keys to check this if possible. Quote
Dogarooski Posted August 31, 2016 Posted August 31, 2016 You mean like the "Window:KeyDown()" function? If your window variable is global (which it is by default in the main.lua file) you can just call "window:KeyDown()" anywhere in the script. Quote
Rick Posted August 31, 2016 Author Posted August 31, 2016 I mean telling me what key was down vs me going through them all like I have to do with KeyDown. A KeyPress function that returns the key code if one was pressed would be nice. Quote
gamecreator Posted September 1, 2016 Posted September 1, 2016 Hopefully Josh sees threads like yours and mine and seriously considers this. Quote
Bytecroc Posted September 8, 2016 Posted September 8, 2016 For C++ this is possibly a suggestion for the problem with some missing key functions http://www.leadwerks.com/werkspace/topic/14370-is-there-a-scan-code-function/ Quote Leadwerks 4.x Pro, examples please for C++, english is not my native language.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.