Input Functions - SmallSquareStudios/Psych-Engine-Wiki-Extra GitHub Wiki
Keyboard Functions
For a list of keyboard inputs, look here
Game Keyboard Functions
keyJustPressed(name:String)
Gets if the UI key was just pressed on the current frame. Returns true if it was.
Keys: 'left'
, 'down'
, 'up'
, 'right'
, 'accept'
, 'back'
, 'pause'
, 'reset'
, 'space'
.
keyPressed(name:String)
Gets if the UI key is being held down on the current frame. Returns true if it is.
Keys: 'left'
, 'down'
, 'up'
, 'right'
, 'space'
keyReleased(name:String)
Gets if the UI key was released on the current frame. Returns true if it was.
Keys: 'left'
, 'down'
, 'up'
, 'right'
, 'space'
Keyboard Functions
keyboardJustPressed(key:String)
Gets if the key was just pressed on the current frame. Returns true if it was.
keyboardPressed(key:String)
Gets if the key is being held down on the current frame. Returns true if it is.
keyboardReleased(key:String)
Gets if the key was released on the current frame. Returns true if it was.
Mouse Functions
mouseJustClicked(button:String)
Gets if the mouse button was just clicked on the current frame. Returns true if it was.
button
- The button to check for. Can either be left
, right
, or middle
.
mouseClicked(button:String)
Gets if the mouse button is being held down on the current frame. Returns true if it was.
button
- The button to check for. Can either be left
, right
, or middle
.
mouseReleased(button:String)
Gets if the mouse button was released on the current frame. Returns true if it was.
button
- The button to check for. Can either be left
, right
, or middle
.
getMouseX(camera:String)
Returns the x position of the mouse cursor as an int.
camera
- The camera to get the mouse position from. Can either be camGame
, camHUD
, or camOther
.
getMouseY(camera:String)
Returns the y position of the mouse cursor as an int.
camera
- The camera to get the mouse position from. Can either be camGame
, camHUD
, or camOther
.