public readonly record struct InputControlOne control on one family of device: the thing a binding points at.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A control names a device family, not a device. Which physical gamepad a binding reads is settled by the reading asset's GamepadSlot, not written into the asset — otherwise a two-player game's second .vxinput would differ from the first only in a device id, and unplugging a pad would invalidate the file rather than the pairing.
Six bytes, no allocation, and comparable — which is what makes conflict detection a set operation rather than a string comparison over binding paths.
Fields and properties (6)
public InputDeviceKind DeviceWhich family of device.
public ushort CodeWhich control, as the device family's own enum — InputKey, MouseControl, GamepadControl, TouchControl.
public byte IndexWhich instance: the finger for a touch control, and otherwise the slot the control's device is paired to. 0 is "whichever device the reading player has".
public static InputControl NoneNo control. What an unresolved binding reads as.
public bool IsValidWhether this names a control at all.
public bool IsAnalogueWhether the control is analogue — a stick, a trigger, a motion delta, a position.
Methods (6)
public InputControl(InputDeviceKind Device, ushort Code, byte Index = 0)One control on one family of device: the thing a binding points at.
public static InputControl Key(InputKey key)A keyboard key.
public static InputControl Mouse(MouseControl control)A mouse control.
public static InputControl Gamepad(GamepadControl control, byte index = 0)A gamepad control.
public static InputControl Touch(TouchControl control, byte finger = 0)A touch control.
public override string ToString()Returns the fully qualified type name of this instance.
Used by (18)
- GamepadDeviceVixen.Input
- IInputDeviceVixen.Input
- InputActionVixen.Input
- InputActionsVixen.Input
- InputBindingVixen.Input
- InputBindingConflictVixen.Input
- InputBindingPartVixen.Input
- InputControlPathVixen.Input
- InputControlPathTestsVixen.Input.Tests
- InputDeviceSetVixen.Input
- InputKeyTestsVixen.Input.Tests
- InputRebindingOperationVixen.Input
- InputRebindingTestsVixen.Input.Tests
- KeyboardDeviceVixen.Input
- MouseDeviceVixen.Input
- TouchDeviceVixen.Input
- InputActionsViewVixen.Editor.AssetEditors
- PlatformInputTestsVixen.App.Tests