KROYSDOCS
HomeWhat's newv0.1.0

InputControl

One physical control (key, mouse button, gamepad button or axis, mouse motion or wheel axis) with the modifier keys it requires.

Kindrecord struct
NamespaceKroys.EngineScripting
Members8
SourceInputTypes.cs
DECLARATION

Declaration

Namespace Kroys.EngineScripting.

Declaration
public readonly record struct InputControl(InputDevice Device, int Code, InputModifiers Modifiers = InputModifiers.None)
REFERENCE

Members

Constructors
#public InputControl(InputDevice Device, int Code, InputModifiers Modifiers = InputModifiers.None)
One physical control (key, mouse button, gamepad button or axis, mouse motion or wheel axis) with the modifier keys it requires.
Device
The kind of control.
Code
The key, button or axis code on that device.
Modifiers
Modifier keys that must be held.
constructor
Properties
#public InputDevice Device { get; init; }
The kind of control.
property
#public int Code { get; init; }
The key, button or axis code on that device.
property
#public InputModifiers Modifiers { get; init; }
Modifier keys that must be held.
property
Methods
#public static InputControl Key(KeyCode key, InputModifiers modifiers = InputModifiers.None)
A keyboard key, optionally with modifiers (for example Ctrl+S).
methodstatic
#public static InputControl Mouse(MouseButton button, InputModifiers modifiers = InputModifiers.None)
A mouse button.
methodstatic
#public static InputControl Gamepad(GamepadButton button)
A gamepad button.
methodstatic
#public static InputControl Axis(GamepadAxis axis)
A gamepad stick or trigger axis.
methodstatic
Signatures
public InputControl(InputDevice Device, int Code, InputModifiers Modifiers = InputModifiers.None)
public InputDevice Device { get; init; }
public int Code { get; init; }
public InputModifiers Modifiers { get; init; }
public static InputControl Key(KeyCode key, InputModifiers modifiers = InputModifiers.None)
public static InputControl Mouse(MouseButton button, InputModifiers modifiers = InputModifiers.None)
public static InputControl Gamepad(GamepadButton button)
public static InputControl Axis(GamepadAxis axis)

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.