pyunity.input module

pyunity.input.GetKey(keycode)[source]

Check if key has been pressed at moment of function call

Parameters:keycode (KeyCode) – Key to query
Returns:If the key is pressed
Return type:boolean
pyunity.input.GetKeyDown(keycode)[source]

Check if key was pressed down this frame.

Parameters:keycode (KeyCode) – Key to query
Returns:If the key is pressed
Return type:boolean
pyunity.input.GetKeyUp(keycode)[source]

Check if key was released this frame.

Parameters:keycode (KeyCode) – Key to query
Returns:If the key is pressed
Return type:boolean
class pyunity.input.KeyCode[source]

Bases: enum.Enum

An enumeration.

class pyunity.input.KeyState[source]

Bases: enum.Enum

An enumeration.