Provides a set of key codes that are mapped directly to physical keyboard and mouse keys.
If true
, preserves primary controls (such as turning the Camera and selecting items)
when a custom primary input was defined.
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 Input.preserveApplicationInput.
Primary input per platform: