pyunity.input module¶
Module to manage getting input from window providers.
This will be imported as pyunity.Input
.
-
class
pyunity.input.
Code
(vals)[source]¶ Bases:
object
Represents a key on a keyboard. Do not instantiate this class.
-
pyunity.input.
GetKey
(keycode)[source]¶ Check if key has been pressed.
Parameters: keycode (KeyCode) – Key to query Returns: 1 if pressed and 0 if not pressed. Return type: int
-
pyunity.input.
GetKeyDown
(keycode)[source]¶ Check if key was pressed down this frame.
Parameters: keycode (KeyCode) – Key to query Returns: 1 if pressed and 0 if not pressed. Return type: int