You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updates to migration guide for Pen events
* Updates to migration guide for Keyboard IME text composition
* Removed migration info for Input.mousePresent
-[Discover all connected devices](#discover-all-connected-devices)
16
16
17
17
A [`Gamepad`](../api/UnityEngine.InputSystem.Gamepad.html) is narrowly defined as a Device with two thumbsticks, a D-pad, and four face buttons. Additionally, gamepads usually have two shoulder and two trigger buttons. Most gamepads also have two buttons in the middle.
18
18
@@ -198,3 +198,37 @@ The Input System support Switch Pro controllers on desktop computers via the [`S
198
198
## Cursor Control
199
199
200
200
Togivegamepadsandjoystickscontroloverahardwareorsoftwarecursor, youcanusethe [`VirtualMouseInput`](../api/UnityEngine.InputSystem.UI.VirtualMouseInput.html) component. See [`VirtualMouseInput` component](UISupport.md#virtual-mouse-cursor-control) intheUIsectionofthemanual.
Sensors are [`InputDevices`](Devices.md) that measure environmental characteristics of the device that the content is running on. Unity currently supports sensors on iOS and Android. Android supports a wider range of sensors than iOS.
Use the accelerometer to measure the acceleration of a device. This is useful to control content by moving a device around. It reports the acceleration measured on a device both due to moving the device around, and due to gravity pulling the device down. You can use `GravitySensor` and `LinearAccelerationSensor` to get separate values for these. Values are affected by the [__Compensate Orientation__](Settings.md#compensate-orientation) setting.
86
86
87
+
The following code traces all input events on the [`Accelerometer.current`](../api/UnityEngine.InputSystem.Accelerometer.html) device.
Use the gyroscope to measure the angular velocity of a device. This is useful to control content by rotating a device. Values are affected by the [__Compensate Orientation__](Settings.md#compensate-orientation) setting.
/// <para>Note: The Input System identifies keys by physical layout, not according to the current language mapping of the keyboard. To query the name of the key according to the language mapping, use <see cref="InputControl.displayName"/>.
122
+
///
123
+
/// You can also use this to read mouse buttons, as shown in the following examples:</para>
/// _Note_: The Input System identifies keys by physical layout, not according to the current language mapping of the keyboard. To query the name of the key according to the language mapping, use <see cref="InputControl.displayName"/>.
227
+
///
228
+
/// You can also use this property to read mouse buttons. For example:
@@ -200,6 +259,29 @@ public bool wasPressedThisFrame
200
259
}
201
260
}
202
261
262
+
/// <summary>
263
+
/// Whether the press ended this frame.
264
+
/// </summary>
265
+
/// <value>True if the current press of the button ended this frame.</value>
266
+
/// <remarks>
267
+
/// _Note_: The Input System identifies keys by physical layout, not according to the current language mapping of the keyboard. To query the name of the key according to the language mapping, use <see cref="InputControl.displayName"/>.
268
+
/// </remarks>
269
+
/// <example>
270
+
/// <para>An example showing the use of this property on a gamepad button and a keyboard key:</para>
0 commit comments