Jump to content

any way to detect when key is released


reaper2259
 Share

Recommended Posts

Hey everyone im wondering if there is any way to get when a key is released in lua.

 

I know how to get when the key has been pressed down with KeyHit but i need something like KeyRelease or KeyUp because i need to call something when the player releases the specific key.

 

also is there any way to get when any key is pressed such as window:KeyHit(Key.Any) these would be really useful in many ways.

 

thanks for any help.

Link to comment
Share on other sites

Maybe test for when KeyDown() is no longer true?

 

Heyy sorry for the confusion but i know how to manually do it using Booleans and if statements but was just wondering if there is any actual call like KeyUp which would just make things easier and less code when you need to make a lot of calls.

 

I don't have a project requiring heavy amounts of key release actions right now but its just something that would be of use.

 

Thanks for your help but i guess there isn't any such code currently.

Link to comment
Share on other sites

Why not check for key hit instead of KeyDown?

 

Are you making a chat box?

 

hi im not making a chat box and keyhit only returns when the key is first pressed, im not making anything really i was just looking to see if there was a way to just call something like KeyUp or KeyRelease rather than typing out my own manual checks.

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