Provides a set of key codes that are mapped directly to physical keyboard and mouse keys.
Returns current mouse or touch position in this frame.
Note: On mobile, this will always return the last detected touch position.
Toggles animated reticle display.
If true:
Note: Can be used with Camera.mouseLocked to create mouse-based camera control on desktop.
Binds the left mouse button click to the specified Input.KeyCode.
When the key is pressed, a click from the current mouse position is send.
Note: No click is send on mobile and VR devices.
Triggers an event whenever the specified Input.KeyCode is pressed down.
Note: Only one onKeyDown handler can be defined for a key at any time.
function to call. Pass null to remove the handler.
key to press.
Triggers every frame while specified Input.KeyCode is pressed.
Note: Only one onKeyPressed handler can be defined for a key at any time.
function to call. Pass null to remove the handler.
key to press.
Triggers an event whenever the specified Input.KeyCode is released.
Note: Only one onKeyUp handler can be defined for a key at any time.
function to call. Pass null to remove the handler.
key to press.
Input related methods and properties.
Note: Setting event handlers to the primary input will overwrite it. To preserve the primary input, use {@link Input.preserveApplicationInput}.
Primary input per platform: