Jump to content

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


DerRidda
 Share

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.

  • Upvote 1
Link to comment
Share on other sites

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

 

self.window:GetMousePosition().z

 

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/window/windowgetmouseposition-r455

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

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.

Guest
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.

 Share

×
×
  • Create New...