Jump to content

Is there any way to get a key/mouse button directly in Lua?

Recommended Posts

The title says it all.


It seems like I would have to iterate through all valid keys/mouse buttons if I just wanted to know what was just pressed/what is held down without having any expectation of what should be pressed/down.


I just wanted to find out how Leadwerks deals with keys not found on a US keyboard like (Ä, Ö, Ü) and mice with more than three buttons.

I couldn't find anything that would just get an input event and tell me what it is.


This would also be very useful in dealing with options menus for key rebinding though this is still doable with iterating through all valid keys it just seems simpler and more powerful to just get the input event.

Share this post

Link to post

Also, the documentation doesn't seem to say anything about checking for mouse wheel scrolling (in Lua). Am I missing something?

This seems like something very basic missing.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...