File size: 8,244 Bytes
18a519f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | using UnityEngine.InputSystem.Utilities;
namespace UnityEngine.InputSystem
{
/// <summary>
/// A collection of common usage string values as reported by <see cref="InputControl.usages"/>.
/// </summary>
public static class CommonUsages
{
/// <summary>
/// Primary 2D motion control.
/// </summary>
/// <remarks>
/// Example: Left stick on a gamepad.
/// </remarks>
public static readonly InternedString Primary2DMotion = new InternedString("Primary2DMotion");
/// <summary>
/// Secondary 2D motion control.
/// </summary>
/// <remarks>
/// Example: Right stick on a gamepad.
/// </remarks>
public static readonly InternedString Secondary2DMotion = new InternedString("Secondary2DMotion");
/// <summary>
/// The primary action control on any input device, such as a gamepad, mouse, or keyboard.
/// </summary>
/// <remarks>
/// Example: Primary mouse button (left button on right-handed configuration, right button on left-handed configuration),
/// south-button on a gamepad.
/// </remarks>
public static readonly InternedString PrimaryAction = new InternedString("PrimaryAction");
/// <summary>
/// Secondary action control on any input device, such as a gamepad, mouse, or keyboard.
/// </summary>
/// <remarks>
/// Example: Secondary mouse button (right button on right-handed configuration, left button on left-handed configuration),
/// east-button on a gamepad.
/// </remarks>
public static readonly InternedString SecondaryAction = new InternedString("SecondaryAction");
/// <summary>
/// The primary trigger control on input devices with triggers.
/// </summary>
/// <remarks>
/// Example: Right trigger-button on a gamepad.
/// </remarks>
public static readonly InternedString PrimaryTrigger = new InternedString("PrimaryTrigger");
/// <summary>
/// The secondary trigger control on input devices with triggers.
/// </summary>
/// <remarks>
/// Example: Left trigger-button on a gamepad.
/// </remarks>
public static readonly InternedString SecondaryTrigger = new InternedString("SecondaryTrigger");
/// <summary>
/// A modifier action control that modifies usage of other controls.
/// </summary>
/// <remarks>
/// Example: Keyboard modifier keys like CTRL, SHIFT, ALT, OPTION, etc.
/// </remarks>
public static readonly InternedString Modifier = new InternedString("Modifier");
/// <summary>
/// The spatial position control on input devices with spatial tracking.
/// </summary>
/// <remarks>
/// Example: User head position in tracking-space using e.g. a head-tracking system. This could for example be a VR tracking system or another user-facing tracking sensor.
/// </remarks>
public static readonly InternedString Position = new InternedString("Position");
/// <summary>
/// The spatial orientation control on input devices with spatial tracking.
/// </summary>
/// <remarks>
/// Example: User head-orientation in tracking-space using e.g. a head-tracking system. This could for example be a VR tracking system or another user-facing tracking sensor.
/// </remarks>
public static readonly InternedString Orientation = new InternedString("Orientation");
/// <summary>
/// The primary hat-switch control on input devices with hat-switches such as joysticks or gamepads.
/// </summary>
/// <remarks>
/// Example: Joystick or gamepad hat-switch.
/// </remarks>
public static readonly InternedString Hatswitch = new InternedString("Hatswitch");
/// <summary>
/// Button to navigate to previous location.
/// </summary>
/// <remarks>
/// Example: Escape on keyboard, B button on gamepad.
///
/// In general, the "Back" control is used for moving backwards in the navigation history
/// of a UI. This is used, for example, in hierarchical menu structures to move back to parent menus
/// (e.g. from the "Settings" menu back to the "Main" menu). Consoles generally have stringent requirements
/// as to which button has to fulfill this role.
/// </remarks>
public static readonly InternedString Back = new InternedString("Back");
/// <summary>
/// Button to navigate to next location.
/// </summary>
public static readonly InternedString Forward = new InternedString("Forward");
/// <summary>
/// Button to bring up menu.
/// </summary>
public static readonly InternedString Menu = new InternedString("Menu");
/// <summary>
/// Button to confirm the current choice.
/// </summary>
public static readonly InternedString Submit = new InternedString("Submit");
////REVIEW: isn't this the same as "Back"?
/// <summary>
/// Button to not accept the current choice.
/// </summary>
public static readonly InternedString Cancel = new InternedString("Cancel");
/// <summary>
/// Horizontal motion axis.
/// </summary>
/// <remarks>
/// Example: X axis on mouse.
/// </remarks>
public static readonly InternedString Horizontal = new InternedString("Horizontal");
/// <summary>
/// Vertical motion axis.
/// </summary>
/// <remarks>
/// Example: Y axis on mouse.
/// </remarks>
public static readonly InternedString Vertical = new InternedString("Vertical");
/// <summary>
/// Rotation around single, fixed axis.
/// </summary>
/// <remarks>
/// Example: twist on joystick or twist of pen (few pens support that).
/// </remarks>
public static readonly InternedString Twist = new InternedString("Twist");
/// <summary>
/// Pressure level axis.
/// </summary>
/// <remarks>
/// Example: pen pressure.
/// </remarks>
public static readonly InternedString Pressure = new InternedString("Pressure");
/// <summary>
/// Axis to scroll horizontally.
/// </summary>
public static readonly InternedString ScrollHorizontal = new InternedString("ScrollHorizontal");
/// <summary>
/// Axis to scroll vertically.
/// </summary>
public static readonly InternedString ScrollVertical = new InternedString("ScrollVertical");
/// <summary>
/// A screen-space point.
/// </summary>
/// <remarks>
/// Example: Touch contact point.
/// </remarks>
public static readonly InternedString Point = new InternedString("Point");
/// <summary>
/// Low-frequency haptic motor for force-feedback.
/// </summary>
public static readonly InternedString LowFreqMotor = new InternedString("LowFreqMotor");
/// <summary>
/// High-frequency haptic motor for force-feedback.
/// </summary>
public static readonly InternedString HighFreqMotor = new InternedString("HighFreqMotor");
/// <summary>
/// Device in left hand.
/// </summary>
/// <remarks>
/// Example: left hand XR controller.
/// </remarks>
public static readonly InternedString LeftHand = new InternedString("LeftHand");
/// <summary>
/// Device in right hand.
/// </summary>
/// <remarks>
/// Example: right hand XR controller.
/// </remarks>
public static readonly InternedString RightHand = new InternedString("RightHand");
/// <summary>
/// Axis representing charge of battery (1=full, 0=empty).
/// </summary>
public static readonly InternedString BatteryStrength = new InternedString("BatteryStrength");
}
}
|