Module system.game.Input

Functions

getHeldKeys () Returns a list containing all keys that are being held down in the current frame.
getPressedKeys () Returns a list containing all keys that were pressed down in the current frame.
keyDown (keyname) Checks if the key with the specified name is currently pressed.
keyPress (keyname) Checks if the key with the specified name was just pressed.
keyRelease (keyname) Checks if the key with the specified name was just released.
mouseDown (button) Checks if the specified mouse button is pressed.
mouseFocus () Returns true if the mouse is over the game window, false if the mouse is off the game window.
mousePress (button)
mouseRelease (button)
mouseX () Returns the horizontal mouse position.
mouseY () Returns the vertical mouse position.
scrollX () Returns the horizontal scrolling distance for this frame.
scrollY () Returns the vertical scrolling distance for this frame.
suppressKey (keyname) Suppresses the specified keypress, preventing it from being recognized as pressed within the same frame.
text () Returns a list of unicode codepoints entered in the current frame.


Functions

getHeldKeys ()
Returns a list containing all keys that are being held down in the current frame.
getPressedKeys ()
Returns a list containing all keys that were pressed down in the current frame.
keyDown (keyname)
Checks if the key with the specified name is currently pressed.

Parameters:

  • keyname
keyPress (keyname)
Checks if the key with the specified name was just pressed.

Parameters:

  • keyname
keyRelease (keyname)
Checks if the key with the specified name was just released.

Parameters:

  • keyname
mouseDown (button)
Checks if the specified mouse button is pressed. Passing nil tests any mouse button. Available options: "left" (1), "right" (2), "middle" (3), "extra1" (4), "extra2" (5)

Parameters:

  • button
mouseFocus ()
Returns true if the mouse is over the game window, false if the mouse is off the game window.
mousePress (button)

Parameters:

  • button
mouseRelease (button)

Parameters:

  • button
mouseX ()
Returns the horizontal mouse position.
mouseY ()
Returns the vertical mouse position.
scrollX ()
Returns the horizontal scrolling distance for this frame.
scrollY ()
Returns the vertical scrolling distance for this frame.
suppressKey (keyname)
Suppresses the specified keypress, preventing it from being recognized as pressed within the same frame.

Parameters:

  • keyname
text ()
Returns a list of unicode codepoints entered in the current frame.
generated by LDoc 1.4.6