reckfellENGINE

Input

A singleton for handling inputs.

On this page
class InputReckfellSharp

A singleton for handling inputs.

The Input singleton handles key presses, mouse buttons and movement, gamepads, and input actions. Actions and their events can be set in the Input Map tab in Project > Project Settings, or with the InputMap class. Note: Input's methods reflect the global input state and are not affected by Control.AcceptEvent or Viewport.SetInputAsHandled, as those methods only deal with the way input is propagated in the EntityTree.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties6

EmulateMouseFromTouchProperty
# EmulateMouseFromTouch
C#
public static bool EmulateMouseFromTouch { get; set; }

If true, sends mouse input events when tapping or swiping on the touchscreen. See also ProjectSettings.input_devices/pointing/emulate_mouse_from_touch.

EmulateTouchFromMouseProperty
# EmulateTouchFromMouse
C#
public static bool EmulateTouchFromMouse { get; set; }

If true, sends touch input events when clicking or dragging the mouse. See also ProjectSettings.input_devices/pointing/emulate_touch_from_mouse.

IgnoreJoypadOnUnfocusedApplicationProperty
# IgnoreJoypadOnUnfocusedApplication
C#
public static bool IgnoreJoypadOnUnfocusedApplication { get; set; }

If true, joypad input (including motion sensors) and LED light changes will be ignored and joypad vibration will be stopped when the application is not focused.

MouseModeProperty
# MouseMode
C#
public static Input.MouseModeEnum MouseMode { get; set; }

Controls the mouse mode.

SingletonProperty
# Singleton
C#
public static InputInstance Singleton { get; }
UseAccumulatedInputProperty
# UseAccumulatedInput
C#
public static bool UseAccumulatedInput { get; set; }

Enables coalescing compatible events before delivery, such as summing several mouse-motion displacements. Does not merge arbitrary event types or guarantee one call per handler per frame. With false, coalescing is disabled, but agile_event_flushing can retain buffering. Changing this property does not flush events already queued.

Methods86

ActionPressvoid
# ActionPress
C#
public static void ActionPress(StringName action, float strength = 1f);

Programmatically presses an existing action with strength clamped to 0–1. It affects Input polling but does not dispatch an InputEvent or call _Input() by itself. Use ParseInputEvent() for a synthetic event and ActionRelease() to end a programmatic press.

Parameters
NameTypeDefault
actionStringName—
strengthfloat1f
ActionReleasevoid
# ActionRelease
C#
public static void ActionRelease(StringName action);

Releases the specified input action, if the action is currently pressed.

Parameters
NameTypeDefault
actionStringName—
AddJoyMappingvoid
# AddJoyMapping
C#
public static void AddJoyMapping(string mapping, bool updateExisting = false);

Adds a new joypad mapping entry (in SDL format) to the mapping database, and optionally updates the already connected devices. Note: See SDL documentation for more information about the SDL controller mapping format.

Parameters
NameTypeDefault
mappingstring—
updateExistingboolfalse
ClearJoyMotionSensorsCalibrationvoid
# ClearJoyMotionSensorsCalibration
C#
public static void ClearJoyMotionSensorsCalibration(int device);

Clears the calibration information for the specified joypad's motion sensors, if it has any and if they were calibrated. See Input.StartJoyMotionSensorsCalibration for an example on how to use joypad motion sensors and calibration in your games. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
FlushBufferedEventsvoid
# FlushBufferedEvents
C#
public static void FlushBufferedEvents();

Delivers queued Input events in order. Can synchronously invoke input handlers before this method returns. The engine also flushes in its loop; use explicit calls for controlled ordering, not universal acceleration. An empty queue does not replay previous events. Does not freshly poll physical devices or measure input-to-display latency.

GetAccelerometerVector3
# GetAccelerometer
C#
public static Vector3 GetAccelerometer();

Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns Vector3.Zero. Note this method returns an empty Vector3 when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. Note: This method only works on Android and iOS. On other platforms, it always returns Vector3.Zero. Note: For Android, ProjectSettings.input_devices/sensors/enable_accelerometer must be enabled.

Returns Vector3
GetActionRawStrengthfloat
# GetActionRawStrength
C#
public static float GetActionRawStrength(StringName action, bool exactMatch = false);

Returns a value between 0.0 and 1.0 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use Input.GetActionStrength instead. If exact_match is false, it ignores additional input modifiers for InputEventKey and InputEventMouseButton events, and the direction for InputEventJoypadMotion events.

Parameters
NameTypeDefault
actionStringName—
exactMatchboolfalse
Returns float
GetActionStrengthfloat
# GetActionStrength
C#
public static float GetActionStrength(StringName action, bool exactMatch = false);

Returns a value between 0.0 and 1.0 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1.0. If the action is mapped to a control that has no axis such as the keyboard, the value returned will be 0.0 or 1.0. If exact_match is false, it ignores additional input modifiers for InputEventKey and InputEventMouseButton events, and the direction for InputEventJoypadMotion events.

Parameters
NameTypeDefault
actionStringName—
exactMatchboolfalse
Returns float
GetAxisfloat
# GetAxis
C#
public static float GetAxis(StringName negativeAction, StringName positiveAction);

Returns positive-action strength minus negative-action strength. Uses GetActionStrength and therefore differs from GetVector's circular two-axis handling.

Parameters
NameTypeDefault
negativeActionStringName—
positiveActionStringName—
negativeAction

Existing negative-direction action name.

positiveAction

Existing positive-direction action name.

Returns float

Normally -1 to 1; zero can mean no input or cancellation between both directions.

GetConnectedJoypadsReckfell.Collections.Array<int>
# GetConnectedJoypads
C#
public static Reckfell.Collections.Array<int> GetConnectedJoypads();

Returns IDs of devices marked connected. Do not assume the first ID is 0 or permanently identifies a player after reconnection.

Returns Reckfell.Collections.Array<int>

Array of current connected IDs; may be empty. A synthetic axis event alone does not establish a physical-device connection.

GetCurrentCursorShapeInput.CursorShape
# GetCurrentCursorShape
C#
public static Input.CursorShape GetCurrentCursorShape();

Returns the currently assigned cursor shape.

Returns Input.CursorShape
GetDeviceOrientationQuaternion
# GetDeviceOrientation
C#
public static Quaternion GetDeviceOrientation();

Returns the device's orientation as a Quaternion, using hardware-level sensor fusion for stable, drift-free results. If the device does not support orientation sensing, the method returns Quaternion.Identity. The returned quaternion represents the rotation from the device coordinate frame to the world coordinate frame. In portrait mode, the device's coordinate system is: X right, Y up, Z towards viewer. Note: This method only works on Android and iOS. On other platforms, it always returns Quaternion.Identity. Note: For Android, ProjectSettings.input_devices/sensors/enable_device_orientation must be enabled.

Returns Quaternion
GetGravityVector3
# GetGravity
C#
public static Vector3 GetGravity();

Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns Vector3.Zero. Note: This method only works on Android and iOS. On other platforms, it always returns Vector3.Zero. Note: For Android, ProjectSettings.input_devices/sensors/enable_gravity must be enabled.

Returns Vector3
GetGyroscopeVector3
# GetGyroscope
C#
public static Vector3 GetGyroscope();

Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns Vector3.Zero. Note: This method only works on Android and iOS. On other platforms, it always returns Vector3.Zero. Note: For Android, ProjectSettings.input_devices/sensors/enable_gyroscope must be enabled.

Returns Vector3
GetJoyAccelerometerVector3
# GetJoyAccelerometer
C#
public static Vector3 GetJoyAccelerometer(int device);

Returns the acceleration, including the force of gravity, in m/s² of the joypad's accelerometer sensor, if the joypad has one and it's currently enabled. Otherwise, the method returns Vector3.Zero. See also Input.GetJoyGravity and Input.SetJoyMotionSensorsEnabled. For a joypad held in front of you, the returned axes are defined as follows: +X ... -X: left ... right; +Y ... -Y: bottom ... top; +Z ... -Z: farther ... closer. The gravity part value is measured as a vector with length of 9.8 away from the center of the Earth, which is a negative Y value. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
Returns Vector3
GetJoyAxisfloat
# GetJoyAxis
C#
public static float GetJoyAxis(int device, JoyAxis axis);

Reads a stored physical-axis value for a specific device. Does not apply an Input Map deadzone or prove the device is currently connected.

Parameters
NameTypeDefault
deviceint—
axisJoyAxis—
device

Current controller ID, not a player number. Use GetConnectedJoypads for the connected-device list.

axis

JoyAxis selection, such as LeftX. Check direction and assignment on the target device.

Returns float

Stored axis value, or 0 when no entry exists. Zero is not a connection check.

GetJoyGravityVector3
# GetJoyGravity
C#
public static Vector3 GetJoyGravity(int device);

Returns the gravity in m/s² of the joypad's accelerometer sensor, if the joypad has one and it's currently enabled. Otherwise, the method returns Vector3.Zero. See also Input.GetJoyAccelerometer and Input.SetJoyMotionSensorsEnabled. For a joypad held in front of you, the returned axes are defined as follows: +X ... -X: left ... right; +Y ... -Y: bottom ... top; +Z ... -Z: farther ... closer. The gravity part value is measured as a vector with length of 9.8 away from the center of the Earth, which is a negative Y value. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
Returns Vector3
GetJoyGuidstring
# GetJoyGuid
C#
public static string GetJoyGuid(int device);

Returns an SDL-compatible device GUID on platforms that use gamepad remapping, e.g. 030000004c050000c405000000010000. Returns an empty string if it cannot be found. Reckfell uses SDL's internal mappings, supplemented by community-contributed mappings, to determine gamepad names and mappings based on this GUID.

Parameters
NameTypeDefault
deviceint—
Returns string
GetJoyGyroscopeVector3
# GetJoyGyroscope
C#
public static Vector3 GetJoyGyroscope(int device);

Reads calibrated gyroscope angular velocity. Check connection, sensor capability, enablement, and calibration state before use.

Parameters
NameTypeDefault
deviceint—
device

Controller ID with prepared sensors.

Returns Vector3

Vector3 in radians per second. Missing data or ignored input returns zero; zero does not prove stillness or lack of drift.

GetJoyInfoReckfell.Collections.Dictionary
# GetJoyInfo
C#
public static Reckfell.Collections.Dictionary GetJoyInfo(int device);

Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index. On Windows, Linux, macOS, and iOS, the dictionary contains the following fields: raw_name: The name of the controller as it came from the OS, before getting renamed by the controller database. vendor_id: The USB vendor ID of the device. product_id: The USB product ID of the device. serial_number: The serial number of the device. This key won't be present if the serial number is unavailable. The dictionary can also include the following fields under selected platforms: steam_input_index: The Steam Input gamepad index (Windows, Linux, and macOS only). If the device is not a Steam Input device this key won't be present. xinput_index: The index of the controller in the XInput system (Windows only). This key won't be present for devices not handled by XInput. Note: The returned dictionary is always empty on Android and Web.

Parameters
NameTypeDefault
deviceint—
Returns Reckfell.Collections.Dictionary
GetJoyMotionSensorsCalibrationReckfell.Collections.Dictionary
# GetJoyMotionSensorsCalibration
C#
public static Reckfell.Collections.Dictionary GetJoyMotionSensorsCalibration(int device);

Returns the calibration information about the specified joypad's motion sensors in the form of a Reckfell.Collections.Dictionary, if it has any and if they have been calibrated, otherwise returns an empty Reckfell.Collections.Dictionary. The dictionary contains the following fields: gyroscope_offset: average offset in gyroscope values from Vector2.Zero in rad/s. See Input.StartJoyMotionSensorsCalibration for an example on how to use joypad motion sensors and calibration in your games. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
Returns Reckfell.Collections.Dictionary
GetJoyMotionSensorsRatefloat
# GetJoyMotionSensorsRate
C#
public static float GetJoyMotionSensorsRate(int device);

Returns the joypad's motion sensor rate in Hz, if the joypad has motion sensors and they're currently enabled. See also Input.SetJoyMotionSensorsEnabled. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
Returns float
GetJoyNamestring
# GetJoyName
C#
public static string GetJoyName(int device);

Returns the name of the joypad at the specified device index, e.g. PS4 Controller. Reckfell uses the SDL game controller database to determine gamepad names.

Parameters
NameTypeDefault
deviceint—
Returns string
GetJoyNumTouchpadsint
# GetJoyNumTouchpads
C#
public static int GetJoyNumTouchpads(int device);

Returns the number of touchpads on the specified joypad, if it has any. Otherwise, the method returns 0. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
Returns int
GetJoyTouchpadFingerPositionVector2
# GetJoyTouchpadFingerPosition
C#
public static Vector2 GetJoyTouchpadFingerPosition(int device, int finger, int touchpad = 0);

Returns the position of the specified finger on the specified touchpad on the joypad. The X and Y values, if the specified finger is touching the specified touchpad, are in the range from 0.0 to 1.0, with (0.0, 0.0) representing the top-left corner of the touchpad and (1.0, 1.0) representing the bottom-right corner. If the joypad doesn't have the specified touchpad or the specified finger is not currently touching the touchpad, this method returns Vector2(-1.0, -1.0). Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
fingerint—
touchpadint0
Returns Vector2
GetJoyTouchpadFingerPressurefloat
# GetJoyTouchpadFingerPressure
C#
public static float GetJoyTouchpadFingerPressure(int device, int finger, int touchpad = 0);

Returns the pressure of the specified finger on the specified touchpad on the joypad. The return value, if the specified finger is touching the specified touchpad, is in the range from 0.0 to 1.0. If the joypad doesn't have the specified touchpad or the specified finger is not currently touching the touchpad, this method returns -1.0. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
fingerint—
touchpadint0
Returns float
GetJoyTouchpadFingersint[]
# GetJoyTouchpadFingers
C#
public static int[] GetJoyTouchpadFingers(int device, int touchpad = 0);

Returns an array of finger IDs that are currently touching the specified touchpad on the joypad. If the joypad doesn't have the specified touchpad or no fingers are currently touching this touchpad, this method returns an empty array. Note: To retrieve the positions of the touchpad fingers, use Input.GetJoyTouchpadFingerPosition. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
touchpadint0
Returns int[]
GetJoyVibrationDurationfloat
# GetJoyVibrationDuration
C#
public static float GetJoyVibrationDuration(int device);

Returns the duration of the current vibration effect in seconds. Note: This method returns the same value that was passed to Input.StartJoyVibration, and this value does not change when the joypad's vibration runs out, it only gets reset after a call to Input.StopJoyVibration. If you want to check if a joypad is still vibrating, use Input.IsJoyVibrating instead.

Parameters
NameTypeDefault
deviceint—
Returns float
GetJoyVibrationRemainingDurationfloat
# GetJoyVibrationRemainingDuration
C#
public static float GetJoyVibrationRemainingDuration(int device);

Returns the remaining duration of the current vibration effect in seconds.

Parameters
NameTypeDefault
deviceint—
Returns float
GetJoyVibrationStrengthVector2
# GetJoyVibrationStrength
C#
public static Vector2 GetJoyVibrationStrength(int device);

Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. Note: This method returns the same values that were passed to Input.StartJoyVibration, and these values do not change when the joypad's vibration runs out, they only get reset after a call to Input.StopJoyVibration. If you want to check if a joypad is still vibrating, use Input.IsJoyVibrating instead.

Parameters
NameTypeDefault
deviceint—
Returns Vector2
GetLastMouseScreenVelocityVector2
# GetLastMouseScreenVelocity
C#
public static Vector2 GetLastMouseScreenVelocity();

Returns the last mouse velocity in screen coordinates. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements.

Returns Vector2
GetLastMouseVelocityVector2
# GetLastMouseVelocity
C#
public static Vector2 GetLastMouseVelocity();

Returns the last mouse velocity. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements.

Returns Vector2
GetMagnetometerVector3
# GetMagnetometer
C#
public static Vector3 GetMagnetometer();

Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns Vector3.Zero. Note: This method only works on Android and iOS. On other platforms, it always returns Vector3.Zero. Note: For Android, ProjectSettings.input_devices/sensors/enable_magnetometer must be enabled.

Returns Vector3
GetMouseButtonMaskMouseButtonMask
# GetMouseButtonMask
C#
public static MouseButtonMask GetMouseButtonMask();

Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to DisplayServer.MouseGetButtonState.

Returns MouseButtonMask
GetMouseModeInput.MouseModeEnum
# GetMouseMode
C#
public static Input.MouseModeEnum GetMouseMode();
Returns Input.MouseModeEnum
GetVectorVector2
# GetVector
C#
public static Vector2 GetVector(StringName negativeX, StringName positiveX, StringName negativeY, StringName positiveY, float deadzone = -1f);

Builds a vector from four raw action strengths, applies a circular deadzone, and limits length to one. Preserves analog magnitude; do not unconditionally normalize when partial speed is required.

Parameters
NameTypeDefault
negativeXStringName—
positiveXStringName—
negativeYStringName—
positiveYStringName—
deadzonefloat-1f
negativeX

Negative-X action, such as left.

positiveX

Positive-X action, such as right.

negativeY

Negative-Y action, typically up in 2D.

positiveY

Positive-Y action, typically down in 2D.

deadzone

Circular deadzone. A negative value uses the four action deadzones' average. For an explicit threshold, supply a validated finite value from 0 inclusive to 1 exclusive.

Returns Vector2

Vector of length 0–1. At deadzone 0.2, raw (0.3, 0.4) produced (0.225, 0.3); (1, 1) was limited to unit length. This is not two independently processed GetAxis calls.

HasJoyLightbool
# HasJoyLight
C#
public static bool HasJoyLight(int device);

Checks the selected device's registered light capability. Check connection and other capabilities separately; an API does not guarantee the feature on every controller.

Parameters
NameTypeDefault
deviceint—
device

Current device ID from GetConnectedJoypads, not a player number.

Returns bool

true for registered support; false for missing capability or an unknown ID. The unknown-ID fallback was executed.

HasJoyMotionSensorsbool
# HasJoyMotionSensors
C#
public static bool HasJoyMotionSensors(int device);

Checks the selected device's registered motion sensors capability. Check connection and other capabilities separately; an API does not guarantee the feature on every controller.

Parameters
NameTypeDefault
deviceint—
device

Current device ID from GetConnectedJoypads, not a player number.

Returns bool

true for registered support; false for missing capability or an unknown ID. The unknown-ID fallback was executed.

HasJoyVibrationbool
# HasJoyVibration
C#
public static bool HasJoyVibration(int device);

Checks the selected device's registered vibration capability. Check connection and other capabilities separately; an API does not guarantee the feature on every controller.

Parameters
NameTypeDefault
deviceint—
device

Current device ID from GetConnectedJoypads, not a player number.

Returns bool

true for registered support; false for missing capability or an unknown ID. The unknown-ID fallback was executed.

IsActionJustPressedbool
# IsActionJustPressed
C#
public static bool IsActionJustPressed(StringName action, bool exactMatch = false);

Returns true in the frame or physics tick where an action begins being pressed. Multiple reads in one tick can return true; it is not an event queue. Handle an event in _UnhandledInput() when UI must be allowed to consume it before gameplay.

Parameters
NameTypeDefault
actionStringName—
exactMatchboolfalse
Returns bool
IsActionJustPressedByEventbool
# IsActionJustPressedByEvent
C#
public static bool IsActionJustPressedByEvent(StringName action, InputEvent @event, bool exactMatch = false);

Returns true when the user has started pressing the action event in the current frame or physics tick, and the first event that triggered action press in the current frame/physics tick was event. It will only return true on the frame or tick that the user pressed down the button. This is useful for code that needs to run only once when an action is pressed, and the action is processed during input handling (e.g. Entity._Input). If exact_match is false, it ignores additional input modifiers for InputEventKey and InputEventMouseButton events, and the direction for InputEventJoypadMotion events. Note: Returning true does not imply that the action is still pressed. An action can be pressed and released again rapidly, and true will still be returned so as not to miss input. Note: Due to keyboard ghosting, Input.IsActionJustPressed may return false even if one of the action's keys is pressed. See Input examples in the documentation for more information.

Parameters
NameTypeDefault
actionStringName—
eventInputEvent—
exactMatchboolfalse
Returns bool
IsActionJustReleasedbool
# IsActionJustReleased
C#
public static bool IsActionJustReleased(StringName action, bool exactMatch = false);

Returns true when the user stops pressing the action event in the current frame or physics tick. It will only return true on the frame or tick that the user releases the button. Note: Returning true does not imply that the action is still not pressed. An action can be released and pressed again rapidly, and true will still be returned so as not to miss input. If exact_match is false, it ignores additional input modifiers for InputEventKey and InputEventMouseButton events, and the direction for InputEventJoypadMotion events. Note: During input handling (e.g. Entity._Input), use InputEvent.IsActionReleased instead to query the action state of the current event. See also Input.IsActionJustReleasedByEvent.

Parameters
NameTypeDefault
actionStringName—
exactMatchboolfalse
Returns bool
IsActionJustReleasedByEventbool
# IsActionJustReleasedByEvent
C#
public static bool IsActionJustReleasedByEvent(StringName action, InputEvent @event, bool exactMatch = false);

Returns true when the user stops pressing the action event in the current frame or physics tick, and the first event that triggered action release in the current frame/physics tick was event. It will only return true on the frame or tick that the user releases the button. This is useful when an action is processed during input handling (e.g. Entity._Input). Note: Returning true does not imply that the action is still not pressed. An action can be released and pressed again rapidly, and true will still be returned so as not to miss input. If exact_match is false, it ignores additional input modifiers for InputEventKey and InputEventMouseButton events, and the direction for InputEventJoypadMotion events.

Parameters
NameTypeDefault
actionStringName—
eventInputEvent—
exactMatchboolfalse
Returns bool
IsActionPressedbool
# IsActionPressed
C#
public static bool IsActionPressed(StringName action, bool exactMatch = false);

Reports whether an Input Map action is held. This polls state rather than handling one event and does not consume a press. For a single reaction, use IsActionJustPressed() or an event in _UnhandledInput(). A UI-consumed event does not automatically block this polling.

Parameters
NameTypeDefault
actionStringName—
exactMatchboolfalse
Returns bool
IsAnythingPressedbool
# IsAnythingPressed
C#
public static bool IsAnythingPressed();

Returns true if any action, key, joypad button, or mouse button is being pressed. This will also return true if any action is simulated via code by calling Input.ActionPress.

Returns bool
IsEmulatingMouseFromTouchbool
# IsEmulatingMouseFromTouch
C#
public static bool IsEmulatingMouseFromTouch();
Returns bool
IsEmulatingTouchFromMousebool
# IsEmulatingTouchFromMouse
C#
public static bool IsEmulatingTouchFromMouse();
Returns bool
IsIgnoringJoypadOnUnfocusedApplicationbool
# IsIgnoringJoypadOnUnfocusedApplication
C#
public static bool IsIgnoringJoypadOnUnfocusedApplication();
Returns bool
IsJoyButtonPressedbool
# IsJoyButtonPressed
C#
public static bool IsJoyButtonPressed(int device, JoyButton button);

Returns true if you are pressing the joypad button at index button. Note: If you want to check if a joypad button was just pressed, use Reckfell's input action system with Input.IsActionJustPressed or use the Entity._Input method like this instead:

C#
public override void _Input(InputEvent @event)
{
    if (@event is InputEventJoypadButton eventButton && eventButton.Pressed && eventButton.ButtonIndex == JoyButton.A)
    {
        // Your code here.
    }
}
Parameters
NameTypeDefault
deviceint—
buttonJoyButton—
Returns bool
IsJoyKnownbool
# IsJoyKnown
C#
public static bool IsJoyKnown(int device);

Returns true if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them.

Parameters
NameTypeDefault
deviceint—
Returns bool
IsJoyMotionSensorsAutoCalibrationEnabledbool
# IsJoyMotionSensorsAutoCalibrationEnabled
C#
public static bool IsJoyMotionSensorsAutoCalibrationEnabled(int device);

Returns true if automatic calibration is enabled on the joypad's motion sensors. Automatic calibration is enabled by default. See also Input.SetJoyMotionSensorsAutoCalibrationEnabled. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
Returns bool
IsJoyMotionSensorsCalibratedbool
# IsJoyMotionSensorsCalibrated
C#
public static bool IsJoyMotionSensorsCalibrated(int device);

Reads the completed/supplied calibration flag. This does not assess stillness quality: StopJoyMotionSensorsCalibration sets it when the procedure ends.

Parameters
NameTypeDefault
deviceint—
device

Device ID whose state is inspected.

Returns bool

Current flag value; false with no sensor data. Even true requires drift validation on a real device.

IsJoyMotionSensorsCalibratingbool
# IsJoyMotionSensorsCalibrating
C#
public static bool IsJoyMotionSensorsCalibrating(int device);

Returns true if the joypad's motion sensors are currently being manually calibrated. See Input.StartJoyMotionSensorsCalibration for an example on how to use joypad motion sensors and calibration in your games. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
Returns bool
IsJoyMotionSensorsEnabledbool
# IsJoyMotionSensorsEnabled
C#
public static bool IsJoyMotionSensorsEnabled(int device);

Returns true if the requested joypad has motion sensors (gyroscope and/or accelerometer) and they are currently enabled. See also Input.SetJoyMotionSensorsEnabled and Input.HasJoyMotionSensors. See Input.StartJoyMotionSensorsCalibration for an example on how to use joypad motion sensors and calibration in your games. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
Returns bool
IsJoyVibratingbool
# IsJoyVibrating
C#
public static bool IsJoyVibrating(int device);

Returns true if the joypad is still vibrating after a call to Input.StartJoyVibration. Unlike Input.GetJoyVibrationStrength and Input.GetJoyVibrationDuration, this method returns false after the joypad's vibration runs out.

Parameters
NameTypeDefault
deviceint—
Returns bool
IsKeyLabelPressedbool
# IsKeyLabelPressed
C#
public static bool IsKeyLabelPressed(Key keycode);

Returns true if you are pressing the key with the keycode printed on it. You can pass a Key constant or any Unicode character code. Note: If you want to check if a key was just pressed by using its label, use Reckfell's input action system with Input.IsActionJustPressed or use the Entity._Input method like this instead:

C#
public override void _Input(InputEvent @event)
{
    if (@event is InputEventKey eventKey && !eventKey.IsEcho() && eventKey.Pressed && eventKey.KeyLabel == Key.Space)
    {
        // Your code here.
    }
}
Parameters
NameTypeDefault
keycodeKey—
Returns bool
IsKeyPressedbool
# IsKeyPressed
C#
public static bool IsKeyPressed(Key keycode);

Returns true if you are pressing the Latin key in the current keyboard layout. You can pass a Key constant. Input.IsKeyPressed is only recommended over Input.IsPhysicalKeyPressed in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use Input.IsPhysicalKeyPressed. Note: Due to keyboard ghosting, Input.IsKeyPressed may return false even if one of the action's keys is pressed. See Input examples in the documentation for more information. Note: If you want to check if a key was just pressed by using its keycode, use Reckfell's input action system with Input.IsActionJustPressed or use the Entity._Input method like this instead:

C#
public override void _Input(InputEvent @event)
{
    if (@event is InputEventKey eventKey && !eventKey.IsEcho() && eventKey.Pressed && eventKey.Keycode == Key.Space)
    {
        // Your code here.
    }
}
Parameters
NameTypeDefault
keycodeKey—
Returns bool
IsMouseButtonPressedbool
# IsMouseButtonPressed
C#
public static bool IsMouseButtonPressed(MouseButton button);

Returns true if you are pressing the mouse button specified with MouseButton. Note: If you want to check if a mouse button was just pressed, use Reckfell's input action system with Input.IsActionJustPressed or use the Entity._Input method like this instead:

C#
public override void _Input(InputEvent @event)
{
    if (@event is InputEventMouseButton eventMouseButton && eventMouseButton.Pressed && eventMouseButton.ButtonIndex == MouseButton.Left)
    {
        // Your code here.
    }
}
Parameters
NameTypeDefault
buttonMouseButton—
Returns bool
IsPhysicalKeyPressedbool
# IsPhysicalKeyPressed
C#
public static bool IsPhysicalKeyPressed(Key keycode);

Returns true if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a Key constant. Input.IsPhysicalKeyPressed is recommended over Input.IsKeyPressed for in-game actions, as it will make Input.IsPhysicalKeyPressed will also ensure that the top row number keys work on any keyboard layout. If in doubt, use Input.IsPhysicalKeyPressed. Note: Due to keyboard ghosting, Input.IsPhysicalKeyPressed may return false even if one of the action's keys is pressed. See Input examples in the documentation for more information. Note: If you want to check if a key was just pressed by using its physical keycode, use Reckfell's input action system with Input.IsActionJustPressed or use the Entity._Input method like this instead:

C#
public override void _Input(InputEvent @event)
{
    if (@event is InputEventKey eventKey && !eventKey.IsEcho() && eventKey.Pressed && eventKey.PhysicalKeycode == Key.Space)
    {
        // Your code here.
    }
}
Parameters
NameTypeDefault
keycodeKey—
Returns bool
IsUsingAccumulatedInputbool
# IsUsingAccumulatedInput
C#
public static bool IsUsingAccumulatedInput();

Reads the UseAccumulatedInput flag. Does not report whether the event queue is empty or measure physical input latency.

Returns bool

Current event-coalescing flag. false does not imply that all buffering is disabled.

ParseInputEventvoid
# ParseInputEvent
C#
public static void ParseInputEvent(InputEvent @event);

Feeds an InputEvent to the game. Can be used to artificially trigger input events from code. Also generates Entity._Input calls.

C#
var cancelEvent = new InputEventAction();
cancelEvent.Action = "ui_cancel";
cancelEvent.Pressed = true;
Input.ParseInputEvent(cancelEvent);

Note: Calling this function has no influence on the operating system. So for example sending an InputEventMouseMotion will not move the OS mouse cursor to the specified position (use Input.WarpMouse instead) and sending InputEventKey won't toggle between active windows.

Parameters
NameTypeDefault
eventInputEvent—
RemoveJoyMappingvoid
# RemoveJoyMapping
C#
public static void RemoveJoyMapping(string guid);

Removes all mappings from the internal database that match the given GUID. All currently connected joypads that use this GUID will become unmapped. On Android, Reckfell will map to an internal fallback mapping.

Parameters
NameTypeDefault
guidstring—
SetAccelerometervoid
# SetAccelerometer
C#
public static void SetAccelerometer(Vector3 value);

Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS.

Parameters
NameTypeDefault
valueVector3—
SetCustomMouseCursorvoid
# SetCustomMouseCursor
C#
public static void SetCustomMouseCursor(Resource image, Input.CursorShape shape = Input.CursorShape.Arrow, Vector2? hotspot = default);

Sets the selected system cursor slot's image. An empty resource resets the slot to its system appearance. Does not choose every Control's shape or make a hidden/captured cursor visible. Skips the call under Engine.IsEditorHint.

Parameters
NameTypeDefault
imageResource—
shapeInput.CursorShapeInput.CursorShape.Arrow
hotspotVector2?default
image

Image or Texture2D supplying the image. Shared limit is 256×256; test targets separately. Use transparency and lossless import. Reset with an empty resource reference, not an empty Image.

shape

CursorShape slot, default Arrow. Replacing Ibeam does not change the Arrow image.

hotspot

Click point within the image, default (0, 0). Use finite coordinates of an existing pixel; CursorTheme rejects negative and edge values.

SetDefaultCursorShapevoid
# SetDefaultCursorShape
C#
public static void SetDefaultCursorShape(Input.CursorShape shape = Input.CursorShape.Arrow);

Sets the default cursor shape to be used in the viewport instead of Input.CursorShape.Arrow. Note: If you want to change the default cursor shape for Control's nodes, use Control.MouseDefaultCursorShape instead. Note: This method generates an InputEventMouseMotion to update cursor immediately.

Parameters
NameTypeDefault
shapeInput.CursorShapeInput.CursorShape.Arrow
SetDeviceOrientationvoid
# SetDeviceOrientation
C#
public static void SetDeviceOrientation(Quaternion value);

Sets the device orientation quaternion. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS.

Parameters
NameTypeDefault
valueQuaternion—
SetEmulateMouseFromTouchvoid
# SetEmulateMouseFromTouch
C#
public static void SetEmulateMouseFromTouch(bool enable);
Parameters
NameTypeDefault
enablebool—
SetEmulateTouchFromMousevoid
# SetEmulateTouchFromMouse
C#
public static void SetEmulateTouchFromMouse(bool enable);
Parameters
NameTypeDefault
enablebool—
SetGravityvoid
# SetGravity
C#
public static void SetGravity(Vector3 value);

Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS.

Parameters
NameTypeDefault
valueVector3—
SetGyroscopevoid
# SetGyroscope
C#
public static void SetGyroscope(Vector3 value);

Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS.

Parameters
NameTypeDefault
valueVector3—
SetIgnoreJoypadOnUnfocusedApplicationvoid
# SetIgnoreJoypadOnUnfocusedApplication
C#
public static void SetIgnoreJoypadOnUnfocusedApplication(bool enable);
Parameters
NameTypeDefault
enablebool—
SetJoyLightvoid
# SetJoyLight
C#
public static void SetJoyLight(int device, Color color);

Sets the joypad's LED light, if available, to the specified color. See also Input.HasJoyLight. Note: There is no way to get the color of the light from a joypad. If you need to know the assigned color, store it separately. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
colorColor—
SetJoyMotionSensorsAutoCalibrationEnabledvoid
# SetJoyMotionSensorsAutoCalibrationEnabled
C#
public static void SetJoyMotionSensorsAutoCalibrationEnabled(int device, bool enable);

Enables or disables automatic calibration of the joypad's gyroscope. Automatic calibration is enabled by default, so most games don't need to call this or perform any calibration. While enabled, the gyroscope calibration is continuously refined whenever the joypad is detected to be held still, easing corrections in gradually. This removes the need for a dedicated calibration step in most games and keeps up with calibration drift, e.g. from the controller warming up during play. When automatic calibration is disabled, the last calibrated values remain in effect. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
enablebool—
SetJoyMotionSensorsCalibrationvoid
# SetJoyMotionSensorsCalibration
C#
public static void SetJoyMotionSensorsCalibration(int device, Reckfell.Collections.Dictionary calibrationInfo);

Sets the specified joypad's calibration information. See also Input.GetJoyMotionSensorsCalibration. See Input.StartJoyMotionSensorsCalibration for an example on how to use joypad motion sensors and calibration in your games. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
calibrationInfoReckfell.Collections.Dictionary—
SetJoyMotionSensorsEnabledvoid
# SetJoyMotionSensorsEnabled
C#
public static void SetJoyMotionSensorsEnabled(int device, bool enable);

Requests sensor enablement/disablement through the device interface. Does not create support for an unknown ID or automatically calibrate. Do not disable sensors still used by another system.

Parameters
NameTypeDefault
deviceint—
enablebool—
device

Current sensor-capable controller ID.

enable

true to enable, false to disable. Check IsJoyMotionSensorsEnabled separately.

SetMagnetometervoid
# SetMagnetometer
C#
public static void SetMagnetometer(Vector3 value);

Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS.

Parameters
NameTypeDefault
valueVector3—
SetMouseModevoid
# SetMouseMode
C#
public static void SetMouseMode(Input.MouseModeEnum mode);
Parameters
NameTypeDefault
modeInput.MouseModeEnum—
SetUseAccumulatedInputvoid
# SetUseAccumulatedInput
C#
public static void SetUseAccumulatedInput(bool enable);

Sets the same flag as UseAccumulatedInput. Disabling neither delivers events already queued nor guarantees immediate delivery when agile_event_flushing is separately enabled.

Parameters
NameTypeDefault
enablebool—
enable

true coalesces compatible events; false does not coalesce new ones. Does not change the separate agile_event_flushing setting.

ShouldIgnoreDevicebool
# ShouldIgnoreDevice
C#
public static bool ShouldIgnoreDevice(int vendorId, int productId);

Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable SDL_GAMECONTROLLER_IGNORE_DEVICES. See SDL documentation for more information. Note: Some 3rd party tools can contribute to the list of ignored devices. For example, SteamInput creates virtual devices from physical devices for remapping purposes. To avoid handling the same input device twice, the original device is added to the ignore list.

Parameters
NameTypeDefault
vendorIdint—
productIdint—
Returns bool
StartJoyMotionSensorsCalibrationvoid
# StartJoyMotionSensorsCalibration
C#
public static void StartJoyMotionSensorsCalibration(int device);

Starts the process of manually calibrating the specified joypad's gyroscope, if it has one. Once a joypad's gyroscope has been calibrated correctly (e.g. laying still on a table without being rotated), Input.GetJoyGyroscope will return values close or equal to Vector3.Zero when the joypad is not being rotated. Since the gyroscope is calibrated automatically by default (see Input.SetJoyMotionSensorsAutoCalibrationEnabled), most games don't need to calibrate manually. If automatic calibration is enabled, it's paused while the manual calibration is in progress, and resumes when Input.StopJoyMotionSensorsCalibration is called. Here's an example of how to use joypad gyroscope and gyroscope calibration in your games:

C#
private const float GyroSensitivity = 10.0;

public override void _Ready()
{
    // In this example we only use the first connected joypad (id 0).
    if (!Input.GetConnectedJoypads().Contains(0))
    {
        return;
    }

    if (!Input.HasJoyMotionSensors(0))
    {
        return;
    }

    // We must enable the accelerometer and the gyroscope before using them.
    Input.SetJoyMotionSensorsEnabled(0, true);

    // (Tell the users here that they need to put their joypads on a flat surface and wait for confirmation.)

    // Start the calibration process.
    CalibrateMotion();
}

public override void _Process(double delta)
{
    // Only move the object if the joypad motion sensors are calibrated.
    if (Input.IsJoyMotionSensorsCalibrated(0))
    {
        MoveObject(delta);
    }
}

private async Task CalibrateMotion()
{
    Input.StartJoyMotionSensorsCalibration(0);

    // Wait for some time.
    await ToSignal(GetTree().CreateTimer(1.0), EntityTreeTimer.SignalName.Timeout);

    Input.StopJoyMotionSensorsCalibration(0);
    // The joypad is now calibrated.
}

private void MoveObject(double delta)
{
    Entity3D node = ... ; // Put your object here.
    Vector3 gyro = Input.GetJoyGyroscope(0);
    Vector3 rotation = node.Rotation;
    rotation.X -= -gyro.Y * GyroSensitivity * (float)delta; // Use rotation around the Y axis (yaw) here.
    rotation.Y += -gyro.X * GyroSensitivity * (float)delta; // Use rotation around the X axis (pitch) here.
    node.Rotation = rotation;
}

Note: Accelerometer sensor doesn't usually require calibration. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
StartJoyVibrationvoid
# StartJoyVibration
C#
public static void StartJoyVibration(int device, float weakMagnitude, float strongMagnitude, float duration = 0f);

Records a vibration request for the device, not an acknowledgement that motors moved. Check connection, HasJoyVibration, and finite numeric values first. Submit once per event rather than every frame.

Parameters
NameTypeDefault
deviceint—
weakMagnitudefloat—
strongMagnitudefloat—
durationfloat0f
device

Selected connected controller ID.

weakMagnitude

Weak-motor intensity 0–1. The tutorial wrapper additionally rejects NaN and infinity.

strongMagnitude

Strong-motor intensity 0–1; a separate channel, not duration.

duration

Duration in seconds. Supply a positive finite value. Default 0 does not guarantee infinite operation: the current SDL backend converts it to 65,535 ms.

StopJoyMotionSensorsCalibrationvoid
# StopJoyMotionSensorsCalibration
C#
public static void StopJoyMotionSensorsCalibration(int device);

Stops the manual calibration process of the specified joypad's motion sensors. See Input.StartJoyMotionSensorsCalibration for an example on how to use joypad motion sensors and calibration in your games. Note: This feature is only supported on Windows, Linux, macOS, and iOS.

Parameters
NameTypeDefault
deviceint—
StopJoyVibrationvoid
# StopJoyVibration
C#
public static void StopJoyVibration(int device);

Records zero intensities to stop the selected device's vibration. Does not acknowledge physical receipt by hardware.

Parameters
NameTypeDefault
deviceint—
device

Device ID receiving the stop request.

VibrateHandheld2 overloads
# VibrateHandheld · 1/2
C#
public static void VibrateHandheld(int durationMs);

Starts vibrating the handheld device for the specified duration in milliseconds. amplitude is the strength of the vibration, as a value between 0.0 and 1.0. If set to -1.0, the default vibration strength of the device is used. Note: This method is implemented on Android, iOS, and Web. It has no effect on other platforms. Note: For Android, Input.VibrateHandheld requires enabling the VIBRATE permission in the export preset. Otherwise, Input.VibrateHandheld will have no effect. Note: For iOS, specifying the duration is only supported in iOS 13 and later. Note: For Web, the amplitude cannot be changed. Note: Some web browsers such as Safari and Firefox for Android do not support Input.VibrateHandheld. Note: Device settings such as vibration on/off, "do not disturb" mode or specific haptic feedback on/off may prevent Input.VibrateHandheld effects.

Parameters
NameTypeDefault
durationMsint—
# VibrateHandheld · 2/2
C#
public static void VibrateHandheld(int durationMs = 500, float amplitude = -1f);

Starts vibrating the handheld device for the specified duration in milliseconds. amplitude is the strength of the vibration, as a value between 0.0 and 1.0. If set to -1.0, the default vibration strength of the device is used. Note: This method is implemented on Android, iOS, and Web. It has no effect on other platforms. Note: For Android, Input.VibrateHandheld requires enabling the VIBRATE permission in the export preset. Otherwise, Input.VibrateHandheld will have no effect. Note: For iOS, specifying the duration is only supported in iOS 13 and later. Note: For Web, the amplitude cannot be changed. Note: Some web browsers such as Safari and Firefox for Android do not support Input.VibrateHandheld. Note: Device settings such as vibration on/off, "do not disturb" mode or specific haptic feedback on/off may prevent Input.VibrateHandheld effects.

Parameters
NameTypeDefault
durationMsint500
amplitudefloat-1f
WarpMousevoid
# WarpMouse
C#
public static void WarpMouse(Vector2 position);

Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window. Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if Input.MouseModeEnum is set to Input.MouseModeEnum.Confined or Input.MouseModeEnum.ConfinedHidden. Note: Input.WarpMouse is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.

Parameters
NameTypeDefault
positionVector2—

Signals and events1

JoyConnectionChangedEvent
# JoyConnectionChanged
C#
public static event Input.JoyConnectionChangedEventHandler JoyConnectionChanged;

Emitted when a joypad device has been connected or disconnected.

Handler parameters
NameTypeDefault
devicelong—
connectedbool—

Input.CursorShape

ValueDescription
Arrow = 0

Arrow cursor. Standard, default pointing cursor.

Bdiagsize = 11

Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically.

Busy = 5

Busy cursor. Indicates that the application is busy performing an operation, and that it is still usable during the operation.

CanDrop = 7

Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position.

Cross = 3

Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections.

Drag = 6

Drag cursor. Usually displayed when dragging something. Note: Windows lacks a dragging cursor, so Input.CursorShape.Drag is the same as Input.CursorShape.Move for this platform.

Fdiagsize = 12

Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of Input.CursorShape.Bdiagsize. It tells the user they can resize the window or the panel both horizontally and vertically.

Forbidden = 8

Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled.

Help = 16

Help cursor. Usually a question mark.

Hsize = 10

Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally.

Hsplit = 15

Horizontal split mouse cursor. On Windows, it's the same as Input.CursorShape.Hsize.

Ibeam = 1

I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked.

Move = 13

Move cursor. Indicates that something can be moved.

PointingHand = 2

Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item.

Vsize = 9

Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically.

Vsplit = 14

Vertical split mouse cursor. On Windows, it's the same as Input.CursorShape.Vsize.

Wait = 4

Wait cursor. Indicates that the application is busy performing an operation, and that it cannot be used during the operation (e.g. something is blocking its main thread).

Input.MouseModeEnum

ValueDescription
Captured = 2

Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. Note: If you want to process the mouse's movement in this mode, you need to use InputEventMouseMotion.Relative or InputEventMouseMotion.ScreenRelative. Note: Even when captured, the mouse cursor is still able to press buttons if they overlap with the center of the window.

Confined = 3

Confines the mouse cursor to the game window, and make it visible.

ConfinedHidden = 4

Confines the mouse cursor to the game window, and make it hidden.

Hidden = 1

Makes the mouse cursor hidden if it is visible.

Max = 5

Max value of the Input.MouseModeEnum.

Visible = 0

Makes the mouse cursor visible if it is hidden.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.