UInputMan:KeyPressed

From Data Realms Wiki

Jump to: navigation, search
Function
SyntaxUInputMan:KeyPressed( Number )
Description:
If a key has been pressed that sim update the function returns true, else the function returns false. See the Keylist for the keys' numbers.
ReturnsBoolean




Example
DescriptionPrints whether a key has been pressed or not.
Code
  1. if UInputMan:KeyPressed(23) then print(1) else print (0) end
Output1 if "W" has been pressed, 0 if not.
Personal tools