From a0ad998d95afad8b77cd4a37857d6f1ec7b08e36 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Tue, 3 Dec 2024 19:06:01 +0100 Subject: [PATCH 01/24] update keyboard documentation --- .../InputSystem/Controls/InputControl.cs | 54 +++ .../InputSystem/Controls/KeyControl.cs | 2 +- .../InputSystem/Devices/InputDevice.cs | 16 +- .../InputSystem/Devices/Keyboard.cs | 442 ++++++++++++------ 4 files changed, 362 insertions(+), 152 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs index 1f5ec6adec..5d52feb17b 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs @@ -790,6 +790,60 @@ protected void RefreshConfigurationIfNeeded() } } + /// + /// Refresh the configuration of the control. This is used to update the control's state (e.g. Keyboard Layout or display Name of Keys). + /// + /// + /// The system will call this method automatically whenever change is made to one of the control's configuration properties. + /// See . + /// + /// + /// + /// public class MyDevice : InputDevice + /// { + /// public enum Orientation + /// { + /// Horizontal, + /// Vertical, + /// } + /// private Orientation m_Orientation; + /// + /// public Orientation orientation + /// { + /// get + /// { + /// // Call RefreshOrientation if the configuration of the device has been + /// // invalidated since last time we initialized m_Orientation. + /// // Calling RefreshConfigurationIfNeeded() is sufficient in most cases, RefreshConfiguration() forces the refresh. + /// RefreshConfiguration(); + /// return m_Orientation; + /// } + /// } + /// protected override void RefreshConfiguration() + /// { + /// // Fetch the current orientation from the backend. How you do this + /// // depends on your device. Using DeviceCommands is one way. + /// var fetchOrientationCommand = new FetchOrientationCommand(); + /// ExecuteCommand(ref fetchOrientationCommand); + /// m_Orientation = fetchOrientation; + /// + /// // Reflect the orientation on the device. + /// switch (m_Orientation) + /// { + /// case Orientation.Vertical: + /// InputSystem.RemoveDeviceUsage(this, s_Horizontal); + /// InputSystem.AddDeviceUsage(this, s_Vertical); + /// break; + /// + /// case Orientation.Horizontal: + /// InputSystem.RemoveDeviceUsage(this, s_Vertical); + /// InputSystem.AddDeviceUsage(this, s_Horizontal); + /// break; + /// } + /// } + /// } + /// + /// protected virtual void RefreshConfiguration() { } diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/KeyControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/KeyControl.cs index 6e8c5f8b84..de58183fa8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/KeyControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/KeyControl.cs @@ -58,7 +58,7 @@ public int scanCode return m_ScanCode; } } - + /// protected override void RefreshConfiguration() { // Wipe our last cached set of data (if any). diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index f2b469bc73..4228e693b3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -521,10 +521,24 @@ protected virtual void OnAdded() /// /// /// This is called after the device has already been removed. - /// /// /// /// + /// + /// + /// + /// public class MyDevice : InputDevice + /// { + /// protected override void OnRemoved() + /// { + /// // use this context to unassign the current device for instance + /// base.OnRemoved(); + /// if (current == this) + /// current = null; + /// } + /// } + /// + /// protected virtual void OnRemoved() { } diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 20b8e0ecb3..bf6e62020d 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -32,9 +32,8 @@ namespace UnityEngine.InputSystem.LowLevel public unsafe struct KeyboardState : IInputStateTypeInfo { /// - /// Memory format tag for KeybboardState. + /// Memory format tag for KeybboardState. Returns "KEYS". /// - /// Returns "KEYS". /// public static FourCC Format => new FourCC('K', 'E', 'Y', 'S'); @@ -876,6 +875,29 @@ public enum Key /// keyboard or not. It is thus not possible to find out this way whether the underlying /// keyboard has certain keys or not. /// + /// + /// + /// public class InputExample : MonoBehaviour + /// { + /// private string inputText = ""; + /// void Start() + /// { + /// Keyboard.current.onTextInput += OnTextInput; + /// } + /// void Update() + /// { + /// // Check whether the A key on the current keyboard is pressed. + /// if (Keyboard.current.aKey.wasPressedThisFrame) + /// Debug.Log("A Key pressed"); + /// } + /// private void OnTextInput(char ch) + /// { + /// inputText += ch; + /// } + /// } + /// + /// + /// [InputControlLayout(stateType = typeof(KeyboardState), isGenericTypeOfDevice = true)] public class Keyboard : InputDevice, ITextInputReceiver { @@ -883,14 +905,13 @@ public class Keyboard : InputDevice, ITextInputReceiver /// Total number of key controls on a keyboard, i.e. the number of controls /// in . /// - /// Total number of key controls. + /// The integer value represents the total number of key controls. public const int KeyCount = (int)Key.OEM5; /// /// Event that is fired for every single character entered on the keyboard. + /// See . /// - /// Triggered whenever the keyboard receives text input. - /// /// /// /// // Let's say we want to do a typing game. We could define a component @@ -945,7 +966,6 @@ public class Keyboard : InputDevice, ITextInputReceiver /// } /// /// - /// public event Action onTextInput { add @@ -959,11 +979,13 @@ public event Action onTextInput } /// - /// An event that is fired to get IME composition strings. Fired once for every change containing the entire string to date. - /// When using an IME, this event can be used to display the composition string while it is being edited. When a composition - /// string is submitted, one or many events will fire with the submitted characters. + /// An event that is fired to get IME composition strings. Fired once for every change containing the entire string to date. + /// When using an IME, this event can be used to display the composition string while it is being edited. /// /// + /// The composition string is held by the struct. + /// When a composition string is submitted, one or many events will fire with the submitted characters. + /// /// Some languages use complex input methods which involve opening windows to insert characters. /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. /// @@ -975,11 +997,17 @@ public event Action onTextInput /// /// To subscribe to the onIMECompositionChange event, use the following sample code: /// - /// var compositionString = ""; - /// Keyboard.current.onIMECompositionChange += composition => + /// public class KeyboardUtils : MonoBehaviour /// { - /// compositionString = composition.ToString(); - /// }; + /// private string compositionString = ""; + /// + /// void Start(){ + /// Keyboard.current.onIMECompositionChange += composition => + /// { + /// compositionString = composition.ToString(); + /// }; + /// } + /// } /// /// public event Action onIMECompositionChange @@ -995,7 +1023,7 @@ public event Action onIMECompositionChange } /// - /// Activates/deactivates IME composition while typing. This decides whether or not to use the OS supplied IME system. + /// Activates/deactivates IME composition while typing. This decides whether to use the OS supplied IME system or not. /// /// /// @@ -1006,6 +1034,25 @@ public event Action onIMECompositionChange /// See , , /// for more IME settings and data. /// + /// + /// The new IME composition enabled state. True to enable the IME, false to disable it. + /// + /// + /// + /// public class KeyboardUtils : MonoBehaviour + /// { + /// private string compositionString = ""; + /// + /// void Start(){ + /// Keyboard.current.SetIMEEnabled(true); + /// Keyboard.current.onIMECompositionChange += composition => + /// { + /// compositionString = composition.ToString(); + /// }; + /// } + /// } + /// + /// public void SetIMEEnabled(bool enabled) { var command = EnableIMECompositionCommand.Create(enabled); @@ -1021,6 +1068,26 @@ public void SetIMEEnabled(bool enabled) /// /// See for turning IME on/off /// + /// + /// A Vector2 of the IME cursor position to set. + /// + /// + /// + /// public class KeyboardUtils : MonoBehaviour + /// { + /// private Vector2 cursorPosition; + /// + /// void Update () + /// { + /// // Set the IME cursor position to the mouse position + /// var x = Input.GetAxis("Mouse X"); + /// var y = Input.GetAxis("Mouse Y"); + /// cursorPosition = new Vector2(x, y); + /// Keyboard.current.SetIMECursorPosition(cursorPosition); + /// } + /// } + /// + /// public void SetIMECursorPosition(Vector2 position) { SetIMECursorPositionCommand command = SetIMECursorPositionCommand.Create(position); @@ -1051,471 +1118,471 @@ public string keyboardLayout /// /// A synthetic button control that is considered pressed if any key on the keyboard is pressed. /// - /// Control representing the synthetic "anyKey". + /// representing the synthetic "anyKey". public AnyKeyControl anyKey { get; protected set; } /// - /// The space bar key. + /// The space bar key at the bottom of the keyboard. /// - /// Control representing the space bar key. + /// representing the space bar key. public KeyControl spaceKey => this[Key.Space]; /// /// The enter/return key in the main key block. /// - /// Control representing the enter key. /// + /// representing the enter key. /// This key is distinct from the enter key on the numpad which is . /// public KeyControl enterKey => this[Key.Enter]; /// - /// The tab key. + /// The tab key, located on the left side above the . /// - /// Control representing the tab key. + /// representing the tab key. public KeyControl tabKey => this[Key.Tab]; /// /// The ` key. The leftmost key in the row of digits. Directly above . /// - /// Control representing the backtick/quote key. + /// representing the backtick/quote key. public KeyControl backquoteKey => this[Key.Backquote]; /// /// The ' key. The key immediately to the left of . /// - /// Control representing the quote key. + /// representing the quote key. public KeyControl quoteKey => this[Key.Quote]; /// /// The ';' key. The key immediately to the left of . /// - /// Control representing the semicolon key. + /// representing the semicolon key. public KeyControl semicolonKey => this[Key.Semicolon]; /// /// The ',' key. Third key to the left of . /// - /// Control representing the comma key. + /// representing the comma key. public KeyControl commaKey => this[Key.Comma]; /// /// The '.' key. Second key to the left of . /// - /// Control representing the period key. + /// representing the period key. public KeyControl periodKey => this[Key.Period]; /// /// The '/' key. The key immediately to the left of . /// - /// Control representing the forward slash key. + /// representing the forward slash key. public KeyControl slashKey => this[Key.Slash]; /// /// The '\' key. The key immediately to the right of and /// next to or above . /// - /// Control representing the backslash key. + /// representing the backslash key. public KeyControl backslashKey => this[Key.Backslash]; /// /// The '[' key. The key immediately to the left of . /// - /// Control representing the left bracket key. + /// representing the left bracket key. public KeyControl leftBracketKey => this[Key.LeftBracket]; /// /// The ']' key. The key in-between to the left and /// to the right. /// - /// Control representing the right bracket key. + /// representing the right bracket key. public KeyControl rightBracketKey => this[Key.RightBracket]; /// /// The '-' key. The second key to the left of . /// - /// Control representing the minus key. + /// representing the minus key. public KeyControl minusKey => this[Key.Minus]; /// /// The '=' key in the main key block. The key in-between to the left /// and to the right. /// - /// Control representing the equals key. + /// representing the equals key. public KeyControl equalsKey => this[Key.Equals]; /// /// The 'a' key. The key immediately to the right of . /// - /// Control representing the a key. + /// representing the a key. public KeyControl aKey => this[Key.A]; /// /// The 'b' key. The key in-between the to the left and the /// to the right in the bottom-most row of alphabetic characters. /// - /// Control representing the b key. + /// representing the b key. public KeyControl bKey => this[Key.B]; /// /// The 'c' key. The key in-between the to the left and the /// to the right in the bottom-most row of alphabetic characters. /// - /// Control representing the c key. + /// representing the c key. public KeyControl cKey => this[Key.C]; /// /// The 'd' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// Control representing the d key. + /// representing the d key. public KeyControl dKey => this[Key.D]; /// /// The 'e' key. The key in-between the to the left and the /// to the right in the topmost row of alphabetic characters. /// - /// Control representing the e key. + /// representing the e key. public KeyControl eKey => this[Key.E]; /// /// The 'f' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// Control representing the f key. + /// representing the f key. public KeyControl fKey => this[Key.F]; /// /// The 'g' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// Control representing the g key. + /// representing the g key. public KeyControl gKey => this[Key.G]; /// /// The 'h' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// Control representing the h key. + /// representing the h key. public KeyControl hKey => this[Key.H]; /// /// The 'i' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// + /// representing the i key. public KeyControl iKey => this[Key.I]; /// /// The 'j' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// Control representing the j key. + /// representing the j key. public KeyControl jKey => this[Key.J]; /// /// The 'k' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// Control representing the k key. + /// representing the k key. public KeyControl kKey => this[Key.K]; /// /// The 'l' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// Control representing the l key. + /// representing the l key. public KeyControl lKey => this[Key.L]; /// /// The 'm' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// Control representing the m key. + /// representing the m key. public KeyControl mKey => this[Key.M]; /// /// The 'n' key. The key in-between the to the left and the to /// the right in the bottom row of alphabetic characters. /// - /// Control representing the n key. + /// representing the n key. public KeyControl nKey => this[Key.N]; /// /// The 'o' key. The key in-between the to the left and the to /// the right in the top row of alphabetic characters. /// - /// Control representing the o key. + /// representing the o key. public KeyControl oKey => this[Key.O]; /// /// The 'p' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// Control representing the p key. + /// representing the p key. public KeyControl pKey => this[Key.P]; /// /// The 'q' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// Control representing the q key. + /// representing the q key. public KeyControl qKey => this[Key.Q]; /// /// The 'r' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// Control representing the r key. + /// representing the r key. public KeyControl rKey => this[Key.R]; /// /// The 's' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// Control representing the s key. + /// representing the s key. public KeyControl sKey => this[Key.S]; /// /// The 't' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// Control representing the t key. + /// representing the t key. public KeyControl tKey => this[Key.T]; /// /// The 'u' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// Control representing the u key. + /// representing the u key. public KeyControl uKey => this[Key.U]; /// /// The 'v' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// Control representing the v key. + /// representing the v key. public KeyControl vKey => this[Key.V]; /// /// The 'w' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// Control representing the w key. + /// representing the w key. public KeyControl wKey => this[Key.W]; /// /// The 'x' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// Control representing the x key. + /// representing the x key. public KeyControl xKey => this[Key.X]; /// /// The 'y' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// Control representing the y key. + /// representing the y key. public KeyControl yKey => this[Key.Y]; /// /// The 'z' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// Control representing the z key. + /// representing the z key. public KeyControl zKey => this[Key.Z]; /// /// The '1' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 1 key. + /// representing the 1 key. public KeyControl digit1Key => this[Key.Digit1]; /// /// The '2' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 2 key. + /// representing the 2 key. public KeyControl digit2Key => this[Key.Digit2]; /// /// The '3' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 3 key. + /// representing the 3 key. public KeyControl digit3Key => this[Key.Digit3]; /// /// The '4' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 4 key. + /// representing the 4 key. public KeyControl digit4Key => this[Key.Digit4]; /// /// The '5' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 5 key. + /// representing the 5 key. public KeyControl digit5Key => this[Key.Digit5]; /// /// The '6' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 6 key. + /// representing the 6 key. public KeyControl digit6Key => this[Key.Digit6]; /// /// The '7' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 7 key. + /// representing the 7 key. public KeyControl digit7Key => this[Key.Digit7]; /// /// The '8' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 8 key. + /// representing the 8 key. public KeyControl digit8Key => this[Key.Digit8]; /// /// The '9' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 9 key. + /// representing the 9 key. public KeyControl digit9Key => this[Key.Digit9]; /// /// The '0' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// Control representing the 0 key. + /// representing the 0 key. public KeyControl digit0Key => this[Key.Digit0]; /// /// The shift key on the left side of the keyboard. /// - /// Control representing the left shift key. + /// representing the left shift key. public KeyControl leftShiftKey => this[Key.LeftShift]; /// /// The shift key on the right side of the keyboard. /// - /// Control representing the right shift key. + /// representing the right shift key. public KeyControl rightShiftKey => this[Key.RightShift]; /// /// The alt/option key on the left side of the keyboard. /// - /// Control representing the left alt/option key. + /// representing the left alt/option key. public KeyControl leftAltKey => this[Key.LeftAlt]; /// /// The alt/option key on the right side of the keyboard. /// - /// Control representing the right alt/option key. + /// representing the right alt/option key. public KeyControl rightAltKey => this[Key.RightAlt]; /// /// The control/ctrl key on the left side of the keyboard. /// - /// Control representing the left control key. + /// representing the left control key. public KeyControl leftCtrlKey => this[Key.LeftCtrl]; /// /// The control/ctrl key on the right side of the keyboard. /// /// This key is usually not present on Mac laptops. - /// Control representing the right control key. + /// representing the right control key. public KeyControl rightCtrlKey => this[Key.RightCtrl]; /// /// The system "meta" key (Windows key on PC, Apple/command key on Mac) on the left /// side of the keyboard. /// - /// Control representing the left system meta key. + /// representing the left system meta key. public KeyControl leftMetaKey => this[Key.LeftMeta]; /// /// The system "meta" key (Windows key on PC, Apple/command key on Mac) on the right /// side of the keyboard. /// - /// Control representing the right system meta key. + /// representing the right system meta key. public KeyControl rightMetaKey => this[Key.RightMeta]; /// /// Same as . Windows system key on left side of keyboard. /// - /// Control representing the left Windows system key. + /// representing the left Windows system key. public KeyControl leftWindowsKey => this[Key.LeftWindows]; /// /// Same as . Windows system key on right side of keyboard. /// - /// Control representing the right Windows system key. + /// representing the right Windows system key. public KeyControl rightWindowsKey => this[Key.RightWindows]; /// /// Same as . Apple/command system key on left side of keyboard. /// - /// Control representing the left Apple/command system key. + /// representing the left Apple/command system key. public KeyControl leftAppleKey => this[Key.LeftApple]; /// /// Same as . Apple/command system key on right side of keyboard. /// - /// Control representing the right Apple/command system key. + /// representing the right Apple/command system key. public KeyControl rightAppleKey => this[Key.RightApple]; /// /// Same as . Apple/command system key on left side of keyboard. /// - /// Control representing the left Apple/command system key. + /// representing the left Apple/command system key. public KeyControl leftCommandKey => this[Key.LeftCommand]; /// /// Same as . Apple/command system key on right side of keyboard. /// - /// Control representing the right Apple/command system key. + /// representing the right Apple/command system key. public KeyControl rightCommandKey => this[Key.RightCommand]; /// - /// The context menu key. This key is generally only found on PC keyboards. If present, - /// the key is found in-between the to the left and the - /// to the right. It's intention is to bring up the context - /// menu according to the current selection. + /// The context menu key. This key is generally only found on PC keyboards. + /// If present, it is located in-between the and the + /// . It brings up the context menu according to the current selection. /// - /// Control representing the context menu key. + /// representing the context menu key. public KeyControl contextMenuKey => this[Key.ContextMenu]; /// /// The escape key, i.e. the key generally in the top left corner of the keyboard. /// Usually to the left of . /// - /// Control representing the escape key. + /// representing the escape key. public KeyControl escapeKey => this[Key.Escape]; /// /// The left arrow key. Usually in a block by itself and generally to the left /// of . /// - /// Control representing the left arrow key. + /// representing the left arrow key. public KeyControl leftArrowKey => this[Key.LeftArrow]; /// /// The right arrow key. Usually in a block by itself and generally to the right /// of /// - /// Control representing the right arrow key. + /// representing the right arrow key. public KeyControl rightArrowKey => this[Key.RightArrow]; /// /// The up arrow key. Usually in a block by itself and generally on top of the /// . /// - /// Control representing the up arrow key. + /// representing the up arrow key. public KeyControl upArrowKey => this[Key.UpArrow]; /// @@ -1523,15 +1590,15 @@ public string keyboardLayout /// and in-between to the /// left and to the right. /// - /// Control representing the down arrow key. + /// representing the down arrow key. public KeyControl downArrowKey => this[Key.DownArrow]; /// /// The backspace key (usually labeled "delete" on Mac). The rightmost key /// in the top digit row with to the left. /// - /// Control representing the backspace key. /// + /// representing the backspace key. /// On the Mac, this key may be labeled "delete" which however is a /// key different from . /// @@ -1541,43 +1608,43 @@ public string keyboardLayout /// The page down key. Usually in a separate block with /// to the left and above it. /// - /// Control representing the page down key. + /// representing the page down key. public KeyControl pageDownKey => this[Key.PageDown]; /// /// The page up key. Usually in a separate block with /// to the left and below it. /// - /// Control representing the page up key. + /// representing the page up key. public KeyControl pageUpKey => this[Key.PageUp]; /// /// The 'home' key. Usually in a separate block with /// to the right and to the left. /// - /// Control representing the insert key. + /// representing the insert key. public KeyControl homeKey => this[Key.Home]; /// /// The 'end' key. Usually in a separate block with /// to the left and to the right. /// - /// Control representing the end key. + /// representing the end key. public KeyControl endKey => this[Key.End]; /// /// The 'insert' key. Usually in a separate block with /// to its right and sitting below it. /// - /// Control representing the insert key. + /// representing the insert key. public KeyControl insertKey => this[Key.Insert]; /// /// The 'delete' key. Usually in a separate block with /// to its right and sitting above it. /// - /// Control representing the delete key. /// + /// representing the delete key. /// On the Mac, the is also labeled "delete". /// However, this is not this key. /// @@ -1587,7 +1654,7 @@ public string keyboardLayout /// The Caps Lock key. The key below and above /// . /// - /// Control representing the caps lock key. + /// representing the caps lock key. public KeyControl capsLockKey => this[Key.CapsLock]; /// @@ -1595,7 +1662,7 @@ public string keyboardLayout /// to the left and the to the right. May also /// be labeled "F14". /// - /// Control representing the scroll lock key. + /// representing the scroll lock key. public KeyControl scrollLockKey => this[Key.ScrollLock]; /// @@ -1603,7 +1670,7 @@ public string keyboardLayout /// numpad and which usually toggles the numpad between generating /// digits and triggering functions like "insert" etc. instead. /// - /// Control representing the num lock key. + /// representing the num lock key. public KeyControl numLockKey => this[Key.NumLock]; /// @@ -1611,29 +1678,29 @@ public string keyboardLayout /// to the left and to the right. May also /// be labeled "F13". /// - /// Control representing the print screen key. + /// representing the print screen key. public KeyControl printScreenKey => this[Key.PrintScreen]; /// /// The pause/break key. The key sitting to the left of . /// May also be labeled "F15". /// - /// Control representing the pause/break key. + /// representing the pause/break key. public KeyControl pauseKey => this[Key.Pause]; /// /// The enter key on the numpad. The key sitting in the bottom right corner /// of the numpad. /// - /// Control representing the numpad enter key. + /// representing the numpad enter key. public KeyControl numpadEnterKey => this[Key.NumpadEnter]; /// /// The divide ('/') key on the numpad. The key in-between /// to the left and to the right. /// - /// Control representing the numpad divide key. /// + /// representing the numpad divide key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad /// divide key usually is the on PC keyboards. @@ -1645,8 +1712,8 @@ public string keyboardLayout /// with to the left and /// below it. /// - /// Control representing the numpad multiply key. /// + /// representing the numpad multiply key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad /// multiply key usually is the on PC keyboards. @@ -1657,8 +1724,8 @@ public string keyboardLayout /// The minus ('-') key on the numpad. The key on the right side of the numpad with /// above it and below it. /// - /// Control representing the numpad minus key. /// + /// representing the numpad minus key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad /// minus key is usually not present on PC keyboards. Instead, the 17-key layout @@ -1670,8 +1737,8 @@ public string keyboardLayout /// The plus ('+') key on the numpad. The key on the right side of the numpad with /// above it and below it. /// - /// Control representing the numpad plus key. /// + /// representing the numpad plus key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. /// @@ -1687,8 +1754,8 @@ public string keyboardLayout /// The period ('.') key on the numpad. The key in-between the /// to the right and the to the left. /// - /// Control representing the numpad period key. /// + /// representing the numpad period key. /// This key is the same in 17-key and 18-key numpad layouts. /// public KeyControl numpadPeriodKey => this[Key.NumpadPeriod]; @@ -1697,8 +1764,8 @@ public string keyboardLayout /// The equals ('=') key on the numpad. The key in-between to the left /// and to the right in the top row of the numpad. /// - /// Control representing the numpad equals key. /// + /// representing the numpad equals key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. /// @@ -1711,63 +1778,63 @@ public string keyboardLayout /// The 0 key on the numpad. The key in the bottom left corner of the numpad. Usually /// and elongated key. /// - /// Control representing the numpad 0 key. + /// representing the numpad 0 key. public KeyControl numpad0Key => this[Key.Numpad0]; /// /// The 1 key on the numpad. The key on the left side of the numpad with /// below it and above it. /// - /// Control representing the numpad 1 key. + /// representing the numpad 1 key. public KeyControl numpad1Key => this[Key.Numpad1]; /// /// The 2 key on the numpad. The key with the to its left and /// the to its right. /// - /// Control representing the numpad 2 key. + /// representing the numpad 2 key. public KeyControl numpad2Key => this[Key.Numpad2]; /// /// The 3 key on the numpad. The key with the to its left and /// the to its right. /// - /// Control representing the numpad 3 key. + /// representing the numpad 3 key. public KeyControl numpad3Key => this[Key.Numpad3]; /// /// The 4 key on the numpad. The key on the left side of the numpad with the /// below it and the above it. /// - /// Control representing the numpad 4 key. + /// representing the numpad 4 key. public KeyControl numpad4Key => this[Key.Numpad4]; /// /// The 5 key on the numpad. The key in-between the to the left and the /// to the right. /// - /// Control representing the numpad 5 key. + /// representing the numpad 5 key. public KeyControl numpad5Key => this[Key.Numpad5]; /// /// The 6 key on the numpad. The key in-between the to the let and /// the to the right. /// - /// Control representing the numpad 6 key. + /// representing the numpad 6 key. public KeyControl numpad6Key => this[Key.Numpad6]; /// /// The 7 key on the numpad. The key on the left side of the numpad with /// below it and above it. /// - /// Control representing the numpad 7 key. + /// representing the numpad 7 key. public KeyControl numpad7Key => this[Key.Numpad7]; /// /// The 8 key on the numpad. The key in-between the to the left and the /// to the right. /// - /// Control representing the numpad 8 key. + /// representing the numpad 8 key. public KeyControl numpad8Key => this[Key.Numpad8]; /// @@ -1775,98 +1842,98 @@ public string keyboardLayout /// the to the right (or, on 17-key PC keyboard numpads, the elongated /// plus key). /// - /// Control representing the numpad 9 key. + /// representing the numpad 9 key. public KeyControl numpad9Key => this[Key.Numpad9]; /// /// The F1 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F1 key. + /// representing the F1 key. public KeyControl f1Key => this[Key.F1]; /// /// The F2 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F2 key. + /// representing the F2 key. public KeyControl f2Key => this[Key.F2]; /// /// The F3 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F3 key. + /// representing the F3 key. public KeyControl f3Key => this[Key.F3]; /// /// The F4 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F4 key. + /// representing the F4 key. public KeyControl f4Key => this[Key.F4]; /// /// The F5 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F5 key. + /// representing the F5 key. public KeyControl f5Key => this[Key.F5]; /// /// The F6 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F6 key. + /// representing the F6 key. public KeyControl f6Key => this[Key.F6]; /// /// The F7 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F7 key. + /// representing the F7 key. public KeyControl f7Key => this[Key.F7]; /// /// The F8 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F8 key. + /// representing the F8 key. public KeyControl f8Key => this[Key.F8]; /// /// The F9 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F9 key. + /// representing the F9 key. public KeyControl f9Key => this[Key.F9]; /// /// The F10 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F10 key. + /// representing the F10 key. public KeyControl f10Key => this[Key.F10]; /// /// The F11 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F11 key. + /// representing the F11 key. public KeyControl f11Key => this[Key.F11]; /// /// The F12 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// Control representing the F12 key. + /// representing the F12 key. public KeyControl f12Key => this[Key.F12]; /// /// First additional key on the keyboard. /// - /// Control representing . /// + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -1880,8 +1947,8 @@ public string keyboardLayout /// /// Second additional key on the keyboard. /// - /// Control representing . /// + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -1895,8 +1962,8 @@ public string keyboardLayout /// /// Third additional key on the keyboard. /// - /// Control representing . /// + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -1910,8 +1977,8 @@ public string keyboardLayout /// /// Fourth additional key on the keyboard. /// - /// Control representing . /// + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -1925,8 +1992,8 @@ public string keyboardLayout /// /// Fifth additional key on the keyboard. /// - /// Control representing . /// + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -1940,8 +2007,8 @@ public string keyboardLayout /// /// An artificial combination of and into one control. /// - /// Control representing a combined left and right shift key. /// + /// representing a combined left and right shift key. /// This is a button which is considered pressed whenever the left and/or /// right shift key is pressed. /// @@ -1950,8 +2017,8 @@ public string keyboardLayout /// /// An artificial combination of and into one control. /// - /// Control representing a combined left and right ctrl key. /// + /// representing a combined left and right ctrl key. /// This is a button which is considered pressed whenever the left and/or /// right ctrl key is pressed. /// @@ -1960,8 +2027,8 @@ public string keyboardLayout /// /// An artificial combination of and into one control. /// - /// Control representing a combined left and right alt key. /// + /// representing a combined left and right alt key. /// This is a button which is considered pressed whenever the left and/or /// right alt key is pressed. /// @@ -1971,7 +2038,7 @@ public string keyboardLayout /// True when IME composition is enabled. Requires to be called to enable IME, and the user to enable it at the OS level. /// /// - /// + /// representing a combined left and right alt key. /// Some languages use complex input methods which involve opening windows to insert characters. /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. /// @@ -1985,6 +2052,7 @@ public string keyboardLayout /// Key code of key control to return. /// The given is not valid. /// + /// representing a combined left and right alt key. /// This is equivalent to allKeys[(int)key - 1]. /// public KeyControl this[Key key] @@ -2009,21 +2077,33 @@ public KeyControl this[Key key] public static Keyboard current { get; private set; } /// - /// Make the keyboard the current keyboard (i.e. ). + /// Make a keyboard the current active keyboard. /// /// /// A keyboard will automatically be made current when receiving input or when /// added to the input system. + /// The currently active keyboard is tracked in . /// + /// + /// + /// public class InputExample : MonoBehaviour + /// { + /// void Start() + /// { + /// // Add a keyboard and make it the current keyboard. + /// var keyboard = InputSystem.AddDevice(); + /// keyboard.MakeCurrent(); + /// } + /// } + /// + /// public override void MakeCurrent() { base.MakeCurrent(); current = this; } - /// - /// Called when the keyboard is removed from the system. - /// + /// protected override void OnRemoved() { base.OnRemoved(); @@ -2035,6 +2115,24 @@ protected override void OnRemoved() /// Called after the keyboard has been constructed but before it is added to /// the system. /// + /// + /// This method can be overridden to perform control- or device-specific setup work. The most + /// common use case is for looking up child controls and storing them in local getters. + /// + /// + /// + /// public class MyKeyboard : Keyboard + /// { + /// public ButtonControl button { get; private set; } + /// + /// protected override void FinishSetup() + /// { + /// // Cache controls in getters. + /// button = GetChildControl("button"); + /// } + /// } + /// + /// protected override void FinishSetup() { var keyStrings = new[] @@ -2182,11 +2280,23 @@ protected override void RefreshConfiguration() /// /// Called when text input on the keyboard is received. /// - /// Character that has been entered. + /// Char value that represents the character that has been entered. /// - /// The system will call this automatically whenever a is - /// received that targets the keyboard device. + /// The system will call this method automatically whenever a is + /// received that targets the keyboard device. Subscribe to this event by using . /// + /// + /// + /// public class UserTest : MonoBehaviour + /// { + /// // Simulate text input event on the current keyboard. + /// private void FakeInput() + /// { + /// Keyboard.current.OnTextInput('a'); + /// } + /// } + /// + /// public void OnTextInput(char character) { for (var i = 0; i < m_TextInputListeners.length; ++i) @@ -2204,11 +2314,19 @@ public void OnTextInput(char character) /// In most cases, this means that the key inputs the given text when pressed. However, this does not have to be the /// case. Keys do not necessarily lead to character input. /// + /// /// - /// // Find key that prints 'q' character (if any). - /// Keyboard.current.FindKeyOnCurrentKeyboardLayout("q"); + /// + /// public class KeyboardUtils : MonoBehaviour + /// { + /// private void FindKey() + /// { + /// // Retrieve the q key on the current keyboard layout. + /// Keyboard.current.FindKeyOnCurrentKeyboardLayout("q"); + /// } + /// } + /// /// - /// /// public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) { @@ -2219,6 +2337,30 @@ public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) return null; } + /// + /// This is called to set the IME composition strings. Fired once for every change containing the entire string to date. + /// + /// The for the IME composition. + /// + /// To call back to the changed composition string, subscribe to the event. + /// + /// + /// + /// public class KeyboardUtils : MonoBehaviour + /// { + /// private string compositionString = ""; + /// + /// void ChangeIMEComposition () + /// { + /// // Manually creating an input event to change the IME composition + /// var inputEvent = IMECompositionEvent.Create(Keyboard.current.deviceId, "CompositionTestCharacters! ɝ", InputRuntime.s_Instance.currentTime); + /// Keyboard.current.OnIMECompositionChanged(inputEvent.compositionString); + /// } + /// } + /// + /// + /// + /// public void OnIMECompositionChanged(IMECompositionString compositionString) { if (m_ImeCompositionListeners.length > 0) From 0bddacb34d97d25d03b3b3bf7065f9ca671e8ea5 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 12:26:57 +0100 Subject: [PATCH 02/24] fix xml format for MakeCurrent() example --- Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index bf6e62020d..35519b815c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -2091,7 +2091,7 @@ public KeyControl this[Key key] /// void Start() /// { /// // Add a keyboard and make it the current keyboard. - /// var keyboard = InputSystem.AddDevice(); + /// var keyboard = InputSystem.AddDevice("Keyboard"); /// keyboard.MakeCurrent(); /// } /// } From 04a3e1bc8cb1e149b20c42555fb9a374ab97e908 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 12:49:35 +0100 Subject: [PATCH 03/24] fix code examples in InputControl and InputDevice --- .../InputSystem/Controls/InputControl.cs | 16 ++++++++++------ .../InputSystem/Devices/InputDevice.cs | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs index 5d52feb17b..0df10cf1b8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs @@ -726,6 +726,9 @@ protected virtual void FinishSetup() /// /// /// + /// using UnityEngine.InputSystem; + /// using UnityEngine.InputSystem.Utilities; + /// /// // Let's say your device has an associated orientation which it can be held with /// // and you want to surface both as a property and as a usage on the device. /// // Whenever your backend code detects a change in orientation, it should send @@ -799,6 +802,9 @@ protected void RefreshConfigurationIfNeeded() /// /// /// + /// using UnityEngine.InputSystem; + /// using UnityEngine.InputSystem.Utilities; + /// /// public class MyDevice : InputDevice /// { /// public enum Orientation @@ -807,6 +813,8 @@ protected void RefreshConfigurationIfNeeded() /// Vertical, /// } /// private Orientation m_Orientation; + /// private static InternedString s_Vertical = new InternedString("Vertical"); + /// private static InternedString s_Horizontal = new InternedString("Horizontal"); /// /// public Orientation orientation /// { @@ -821,12 +829,8 @@ protected void RefreshConfigurationIfNeeded() /// } /// protected override void RefreshConfiguration() /// { - /// // Fetch the current orientation from the backend. How you do this - /// // depends on your device. Using DeviceCommands is one way. - /// var fetchOrientationCommand = new FetchOrientationCommand(); - /// ExecuteCommand(ref fetchOrientationCommand); - /// m_Orientation = fetchOrientation; - /// + /// // Set Orientation back to horizontal. Alternatively fetch from device. + /// m_Orientation = Orientation.Horizontal; /// // Reflect the orientation on the device. /// switch (m_Orientation) /// { diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index 4228e693b3..b8014d3441 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -527,8 +527,11 @@ protected virtual void OnAdded() /// /// /// + /// using UnityEngine.InputSystem; + /// /// public class MyDevice : InputDevice /// { + /// public static MyDevice current { get; private set; } /// protected override void OnRemoved() /// { /// // use this context to unassign the current device for instance From 6703c57bda877c1bff7eb7f685ac28005aa7f579 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 12:57:42 +0100 Subject: [PATCH 04/24] added example for OnAdded too, uniformed the remarks section --- .../InputSystem/Devices/InputDevice.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index b8014d3441..2cf591a6da 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -508,10 +508,26 @@ public virtual void MakeCurrent() /// /// /// This is called after the device has already been added. - /// /// /// /// + /// + /// + /// + /// using UnityEngine.InputSystem; + /// + /// public class MyDevice : InputDevice + /// { + /// public static MyDevice current { get; private set; } + /// protected override void OnAdded() + /// { + /// // use this context to assign the current device for instance + /// base.OnAdded(); + /// current = this; + /// } + /// } + /// + /// protected virtual void OnAdded() { } @@ -523,7 +539,7 @@ protected virtual void OnAdded() /// This is called after the device has already been removed. /// /// - /// + /// /// /// /// From 4cfc8a6d0f6ddce6495bc06f370e82c311dd903f Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 13:30:50 +0100 Subject: [PATCH 05/24] fixed doc examples in Keyboard.cs --- .../InputSystem/Devices/Keyboard.cs | 74 ++++++++++++++++--- 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 35519b815c..dd259b9145 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -20,9 +20,19 @@ namespace UnityEngine.InputSystem.LowLevel /// /// /// - /// // Send input event with A key pressed on keyboard. - /// InputSystem.QueueStateEvent(Keyboard.current, - /// new KeyboardState(Key.A)); + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// using UnityEngine.InputSystem.LowLevel; + /// + /// public class Example : MonoBehaviour + /// { + /// void Start() + /// { + /// // Send input event with A key pressed on keyboard. + /// InputSystem.QueueStateEvent(Keyboard.current, + /// new KeyboardState(Key.A)); + /// } + /// } /// /// /// @@ -222,11 +232,20 @@ namespace UnityEngine.InputSystem /// /// /// - /// // Look up key by key code. - /// var aKey = Keyboard.current[Key.A]; + /// using UnityEngine; + /// using UnityEngine.InputSystem; /// - /// // Find out which text is produced by the key. - /// Debug.Log($"The '{aKey.keyCode}' key produces '{aKey.displayName}' as text input"); + /// public class Example : MonoBehaviour + /// { + /// void LookUpTextInputByKey() + /// { + /// // Look up key by key code. + /// var aKey = Keyboard.current[Key.A]; + /// + /// // Find out which text is produced by the key. + /// Debug.Log($"The '{aKey.keyCode}' key produces '{aKey.displayName}' as text input"); + /// } + /// } /// /// /// @@ -877,6 +896,9 @@ public enum Key /// /// /// + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// /// public class InputExample : MonoBehaviour /// { /// private string inputText = ""; @@ -914,6 +936,10 @@ public class Keyboard : InputDevice, ITextInputReceiver /// /// /// + /// using System; + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// /// // Let's say we want to do a typing game. We could define a component /// // something along those lines to match the typed input. /// public class MatchTextByTyping : MonoBehaviour @@ -953,7 +979,7 @@ public class Keyboard : InputDevice, ITextInputReceiver /// { /// ++m_Position; /// if (m_Position == m_Text.Length) - /// onTextTypeCorrectly?.Invoke(); + /// onTextTypedCorrectly?.Invoke(); /// } /// else /// { @@ -997,6 +1023,9 @@ public event Action onTextInput /// /// To subscribe to the onIMECompositionChange event, use the following sample code: /// + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// /// public class KeyboardUtils : MonoBehaviour /// { /// private string compositionString = ""; @@ -1039,6 +1068,9 @@ public event Action onIMECompositionChange /// /// /// + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// /// public class KeyboardUtils : MonoBehaviour /// { /// private string compositionString = ""; @@ -1073,6 +1105,9 @@ public void SetIMEEnabled(bool enabled) /// /// /// + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// /// public class KeyboardUtils : MonoBehaviour /// { /// private Vector2 cursorPosition; @@ -2086,6 +2121,9 @@ public KeyControl this[Key key] /// /// /// + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// /// public class InputExample : MonoBehaviour /// { /// void Start() @@ -2121,6 +2159,9 @@ protected override void OnRemoved() /// /// /// + /// using UnityEngine.InputSystem; + /// using UnityEngine.InputSystem.Controls; + /// /// public class MyKeyboard : Keyboard /// { /// public ButtonControl button { get; private set; } @@ -2128,7 +2169,7 @@ protected override void OnRemoved() /// protected override void FinishSetup() /// { /// // Cache controls in getters. - /// button = GetChildControl("button"); + /// button = (ButtonControl)GetChildControl("button"); /// } /// } /// @@ -2287,6 +2328,9 @@ protected override void RefreshConfiguration() /// /// /// + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// /// public class UserTest : MonoBehaviour /// { /// // Simulate text input event on the current keyboard. @@ -2317,6 +2361,9 @@ public void OnTextInput(char character) /// /// /// + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// /// public class KeyboardUtils : MonoBehaviour /// { /// private void FindKey() @@ -2346,14 +2393,17 @@ public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) /// /// /// + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// using UnityEngine.InputSystem.LowLevel; + /// /// public class KeyboardUtils : MonoBehaviour /// { /// private string compositionString = ""; - /// - /// void ChangeIMEComposition () + /// void ChangeIMEComposition() /// { /// // Manually creating an input event to change the IME composition - /// var inputEvent = IMECompositionEvent.Create(Keyboard.current.deviceId, "CompositionTestCharacters! ɝ", InputRuntime.s_Instance.currentTime); + /// var inputEvent = IMECompositionEvent.Create(Keyboard.current.deviceId, "CompositionTestCharacters! ɝ", Time.time); /// Keyboard.current.OnIMECompositionChanged(inputEvent.compositionString); /// } /// } From 95c3c3ed1d50602d58b99c640ac82ca281e4f825 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 13:45:39 +0100 Subject: [PATCH 06/24] remove input manager references from Keyboard.cs --- .../com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index dd259b9145..0aa21e9e52 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -1115,8 +1115,8 @@ public void SetIMEEnabled(bool enabled) /// void Update () /// { /// // Set the IME cursor position to the mouse position - /// var x = Input.GetAxis("Mouse X"); - /// var y = Input.GetAxis("Mouse Y"); + /// var x = Mouse.current.position.x.ReadValue(); + /// var y = Mouse.current.position.y.ReadValue(); /// cursorPosition = new Vector2(x, y); /// Keyboard.current.SetIMECursorPosition(cursorPosition); /// } From 603a947e3b3178b73d4cb88aa82b9ffdeeb0b627 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 14:11:36 +0100 Subject: [PATCH 07/24] fix para section in code example --- Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 0aa21e9e52..983c2c579d 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -1022,6 +1022,7 @@ public event Action onTextInput /// /// /// To subscribe to the onIMECompositionChange event, use the following sample code: + /// /// /// using UnityEngine; /// using UnityEngine.InputSystem; From 389cce957217e54b5a6ae066cdb7a4e4c132a9db Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 14:46:12 +0100 Subject: [PATCH 08/24] fixes on typo and usage --- .../InputSystem/Devices/Keyboard.cs | 828 +++++++++--------- 1 file changed, 415 insertions(+), 413 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 983c2c579d..927d9f5639 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -16,7 +16,7 @@ namespace UnityEngine.InputSystem.LowLevel /// Default state layout for keyboards. /// /// - /// Can be used to update the state of devices. + /// Can be used to update the state of devices. /// /// /// @@ -42,7 +42,7 @@ namespace UnityEngine.InputSystem.LowLevel public unsafe struct KeyboardState : IInputStateTypeInfo { /// - /// Memory format tag for KeybboardState. Returns "KEYS". + /// Memory format tag for KeyboardState. Returns "KEYS". /// /// public static FourCC Format => new FourCC('K', 'E', 'Y', 'S'); @@ -215,7 +215,7 @@ namespace UnityEngine.InputSystem /// so that pressing a key in the same location on different keyboards should result in the same action /// regardless of what is printed on a key or what current system language is set. /// - /// This means, for example, that is always the key to the right of , + /// This means, for example, that is always the key to the right of , /// regardless of which key (if any) produces the "a" character on the current keyboard layout. /// /// Unity relies on physical hardware in the keyboards to report same USB HID "usage" for the keys in @@ -223,12 +223,12 @@ namespace UnityEngine.InputSystem /// might report different data, and this is outside of Unity's control. /// /// For this reason, you should not use key codes to read text input. - /// Instead, you should use the callback. + /// Instead, you should use the callback. /// The `onTextInput` callback provides you with the actual text characters which correspond /// to the symbols printed on a keyboard, based on the end user's current system language layout. /// /// To find the text character (if any) generated by a key according to the currently active keyboard - /// layout, use the property of . + /// layout, use the property of . /// /// /// @@ -262,252 +262,252 @@ public enum Key // ---- Printable keys ---- /// - /// The . + /// The . /// Space, /// - /// The . + /// The . /// Enter, /// - /// The . + /// The . /// Tab, /// - /// The . + /// The . /// Backquote, /// - /// The . + /// The . /// Quote, /// - /// The . + /// The . /// Semicolon, /// - /// The . + /// The . /// Comma, /// - /// The . + /// The . /// Period, /// - /// The . + /// The . /// Slash, /// - /// The . + /// The . /// Backslash, /// - /// The . + /// The . /// LeftBracket, /// - /// The . + /// The . /// RightBracket, /// - /// The . + /// The . /// Minus, /// - /// The . + /// The . /// Equals, /// - /// The . + /// The . /// A, /// - /// The . + /// The . /// B, /// - /// The . + /// The . /// C, /// - /// The . + /// The . /// D, /// - /// The . + /// The . /// E, /// - /// The . + /// The . /// F, /// - /// The . + /// The . /// G, /// - /// The . + /// The . /// H, /// - /// The . + /// The . /// I, /// - /// The . + /// The . /// J, /// - /// The . + /// The . /// K, /// - /// The . + /// The . /// L, /// - /// The . + /// The . /// M, /// - /// The . + /// The . /// N, /// - /// The . + /// The . /// O, /// - /// The . + /// The . /// P, /// - /// The . + /// The . /// Q, /// - /// The . + /// The . /// R, /// - /// The . + /// The . /// S, /// - /// The . + /// The . /// T, /// - /// The . + /// The . /// U, /// - /// The . + /// The . /// V, /// - /// The . + /// The . /// W, /// - /// The . + /// The . /// X, /// - /// The . + /// The . /// Y, /// - /// The . + /// The . /// Z, /// - /// The . + /// The . /// Digit1, /// - /// The . + /// The . /// Digit2, /// - /// The . + /// The . /// Digit3, /// - /// The . + /// The . /// Digit4, /// - /// The . + /// The . /// Digit5, /// - /// The . + /// The . /// Digit6, /// - /// The . + /// The . /// Digit7, /// - /// The . + /// The . /// Digit8, /// - /// The . + /// The . /// Digit9, /// - /// The . + /// The . /// Digit0, @@ -516,167 +516,167 @@ public enum Key // NOTE: The left&right variants for shift, ctrl, and alt must be next to each other. /// - /// The . + /// The . /// LeftShift, /// - /// The . + /// The . /// RightShift, /// - /// The . + /// The . /// LeftAlt, /// - /// The . + /// The . /// RightAlt, /// - /// Same as . + /// Same as . /// AltGr = RightAlt, /// - /// The . + /// The . /// LeftCtrl, /// - /// The . + /// The . /// RightCtrl, /// - /// The . + /// The . /// LeftMeta, /// - /// The . + /// The . /// RightMeta, /// - /// Same as . + /// Same as . /// LeftWindows = LeftMeta, /// - /// Same as . + /// Same as . /// RightWindows = RightMeta, /// - /// Same as . + /// Same as . /// LeftApple = LeftMeta, /// - /// Same as . + /// Same as . /// RightApple = RightMeta, /// - /// Same as . + /// Same as . /// LeftCommand = LeftMeta, /// - /// Same as . + /// Same as . /// RightCommand = RightMeta, /// - /// The . + /// The . /// ContextMenu, /// - /// The . + /// The . /// Escape, /// - /// The . + /// The . /// LeftArrow, /// - /// The . + /// The . /// RightArrow, /// - /// The . + /// The . /// UpArrow, /// - /// The . + /// The . /// DownArrow, /// - /// The . + /// The . /// Backspace, /// - /// The . + /// The . /// PageDown, /// - /// The . + /// The . /// PageUp, /// - /// The . + /// The . /// Home, /// - /// The . + /// The . /// End, /// - /// The . + /// The . /// Insert, /// - /// The . + /// The . /// Delete, /// - /// The . + /// The . /// CapsLock, /// - /// The . + /// The . /// NumLock, /// - /// The . + /// The . /// PrintScreen, /// - /// The . + /// The . /// ScrollLock, /// - /// The . + /// The . /// Pause, @@ -688,147 +688,147 @@ public enum Key // layout neutral here, too, and always use the 18-key blueprint. /// - /// The . + /// The . /// NumpadEnter, /// - /// The . + /// The . /// NumpadDivide, /// - /// The . + /// The . /// NumpadMultiply, /// - /// The . + /// The . /// NumpadPlus, /// - /// The . + /// The . /// NumpadMinus, /// - /// The . + /// The . /// NumpadPeriod, /// - /// The . + /// The . /// NumpadEquals, /// - /// The . + /// The . /// Numpad0, /// - /// The . + /// The . /// Numpad1, /// - /// The . + /// The . /// Numpad2, /// - /// The . + /// The . /// Numpad3, /// - /// The . + /// The . /// Numpad4, /// - /// The . + /// The . /// Numpad5, /// - /// The . + /// The . /// Numpad6, /// - /// The . + /// The . /// Numpad7, /// - /// The . + /// The . /// Numpad8, /// - /// The . + /// The . /// Numpad9, /// - /// The . + /// The . /// F1, /// - /// The . + /// The . /// F2, /// - /// The . + /// The . /// F3, /// - /// The . + /// The . /// F4, /// - /// The . + /// The . /// F5, /// - /// The . + /// The . /// F6, /// - /// The . + /// The . /// F7, /// - /// The . + /// The . /// F8, /// - /// The . + /// The . /// F9, /// - /// The . + /// The . /// F10, /// - /// The . + /// The . /// F11, /// - /// The . + /// The . /// F12, @@ -836,27 +836,27 @@ public enum Key // they end up on the keyboard (if they are present). /// - /// The . + /// The . /// OEM1, /// - /// The . + /// The . /// OEM2, /// - /// The . + /// The . /// OEM3, /// - /// The . + /// The . /// OEM4, /// - /// The . + /// The . /// OEM5, @@ -870,14 +870,14 @@ public enum Key /// /// /// Keyboards allow for both individual button input as well as text input. To receive button - /// input, use the individual -type controls present on the keyboard. - /// For example, . To receive text input, use the + /// input, use the individual -type controls present on the keyboard. + /// For example, . To receive text input, use the /// callback. /// - /// The naming/identification of keys is agnostic to keyboard layouts. This means that , - /// for example, will always be the key to the right of regardless of where + /// The naming/identification of keys is agnostic to keyboard layouts. This means that , + /// for example, will always be the key to the right of regardless of where /// the current keyboard language layout puts the "a" character. This also means that having a - /// binding to "<Keyboard>/a" on an , for example, will + /// binding to "<Keyboard>/a" on an , for example, will /// bind to the same key regardless of locale -- an important feature, for example, for getting /// stable WASD bindings. /// @@ -886,11 +886,11 @@ public enum Key /// "<Keyboard>/#(a)", for example, will bind to the key that produces the "a" /// character according to the currently active keyboard layout. /// - /// To find out which keyboard layout is currently active, you can use the + /// To find out which keyboard layout is currently active, you can use the /// property. Note that keyboard layout names are platform-dependent. /// /// Note that keyboard devices will always have key controls added for all keys in the - /// enumeration -- whether they are actually present on the physical + /// enumeration -- whether they are actually present on the physical /// keyboard or not. It is thus not possible to find out this way whether the underlying /// keyboard has certain keys or not. /// @@ -919,20 +919,20 @@ public enum Key /// } /// /// - /// + /// [InputControlLayout(stateType = typeof(KeyboardState), isGenericTypeOfDevice = true)] public class Keyboard : InputDevice, ITextInputReceiver { /// /// Total number of key controls on a keyboard, i.e. the number of controls - /// in . + /// in . /// /// The integer value represents the total number of key controls. public const int KeyCount = (int)Key.OEM5; /// /// Event that is fired for every single character entered on the keyboard. - /// See . + /// See . /// /// /// @@ -1009,8 +1009,8 @@ public event Action onTextInput /// When using an IME, this event can be used to display the composition string while it is being edited. /// /// - /// The composition string is held by the struct. - /// When a composition string is submitted, one or many events will fire with the submitted characters. + /// The composition string is held by the struct. + /// When a composition string is submitted, one or many events will fire with the submitted characters. /// /// Some languages use complex input methods which involve opening windows to insert characters. /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. @@ -1018,7 +1018,7 @@ public event Action onTextInput /// Many IMEs cause this event to fire with a blank string when the composition is submitted or reset, however it is best /// not to rely on this behaviour since it is IME dependent. /// - /// See for turning IME on/off + /// See for turning IME on/off /// /// /// To subscribe to the onIMECompositionChange event, use the following sample code: @@ -1061,8 +1061,8 @@ public event Action onIMECompositionChange /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. /// Setting this to On, will enable the OS-level IME system when the user presses keystrokes. /// - /// See , , - /// for more IME settings and data. + /// See , , + /// for more IME settings and data. /// /// /// The new IME composition enabled state. True to enable the IME, false to disable it. @@ -1099,7 +1099,7 @@ public void SetIMEEnabled(bool enabled) /// Some languages use complex input methods which involve opening windows to insert characters. /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. /// - /// See for turning IME on/off + /// See for turning IME on/off /// /// /// A Vector2 of the IME cursor position to set. @@ -1139,7 +1139,7 @@ public void SetIMECursorPosition(Vector2 position) /// The value of this property reflects the currently used layout and thus changes /// whenever the layout of the system or the one for the application is changed. /// - /// To determine what a key represents in the current layout, use . + /// To determine what a key represents in the current layout, use . /// public string keyboardLayout { @@ -1154,551 +1154,553 @@ public string keyboardLayout /// /// A synthetic button control that is considered pressed if any key on the keyboard is pressed. /// - /// representing the synthetic "anyKey". + /// representing the synthetic "anyKey". public AnyKeyControl anyKey { get; protected set; } /// /// The space bar key at the bottom of the keyboard. /// - /// representing the space bar key. + /// representing the space bar key. public KeyControl spaceKey => this[Key.Space]; /// /// The enter/return key in the main key block. /// /// - /// representing the enter key. - /// This key is distinct from the enter key on the numpad which is . + /// representing the enter key. + /// This key is distinct from the enter key on the numpad which is . /// public KeyControl enterKey => this[Key.Enter]; /// - /// The tab key, located on the left side above the . + /// The tab key, located on the left side above the . /// - /// representing the tab key. + /// representing the tab key. public KeyControl tabKey => this[Key.Tab]; /// - /// The ` key. The leftmost key in the row of digits. Directly above . + /// The ` key. The leftmost key in the row of digits. Directly above . /// - /// representing the backtick/quote key. + /// representing the backtick/quote key. public KeyControl backquoteKey => this[Key.Backquote]; /// - /// The ' key. The key immediately to the left of . + /// The ' key. The key immediately to the left of . /// - /// representing the quote key. + /// representing the quote key. public KeyControl quoteKey => this[Key.Quote]; /// - /// The ';' key. The key immediately to the left of . + /// The ';' key. The key immediately to the left of . /// - /// representing the semicolon key. + /// representing the semicolon key. public KeyControl semicolonKey => this[Key.Semicolon]; /// - /// The ',' key. Third key to the left of . + /// The ',' key. Third key to the left of . /// - /// representing the comma key. + /// representing the comma key. public KeyControl commaKey => this[Key.Comma]; /// - /// The '.' key. Second key to the left of . + /// The '.' key. Second key to the left of . /// - /// representing the period key. + /// representing the period key. public KeyControl periodKey => this[Key.Period]; /// - /// The '/' key. The key immediately to the left of . + /// The '/' key. The key immediately to the left of . /// - /// representing the forward slash key. + /// representing the forward slash key. public KeyControl slashKey => this[Key.Slash]; /// - /// The '\' key. The key immediately to the right of and - /// next to or above . + /// The '\' key. The key immediately to the right of and + /// next to or above . /// - /// representing the backslash key. + /// representing the backslash key. public KeyControl backslashKey => this[Key.Backslash]; /// - /// The '[' key. The key immediately to the left of . + /// The '[' key. The key immediately to the left of . /// - /// representing the left bracket key. + /// representing the left bracket key. public KeyControl leftBracketKey => this[Key.LeftBracket]; /// - /// The ']' key. The key in-between to the left and - /// to the right. + /// The ']' key. The key in-between to the left and + /// to the right. /// - /// representing the right bracket key. + /// representing the right bracket key. public KeyControl rightBracketKey => this[Key.RightBracket]; /// - /// The '-' key. The second key to the left of . + /// The '-' key. The second key to the left of . /// - /// representing the minus key. + /// representing the minus key. public KeyControl minusKey => this[Key.Minus]; /// - /// The '=' key in the main key block. The key in-between to the left - /// and to the right. + /// The '=' key in the main key block. The key in-between to the left + /// and to the right. /// - /// representing the equals key. + /// representing the equals key. public KeyControl equalsKey => this[Key.Equals]; /// - /// The 'a' key. The key immediately to the right of . + /// The 'a' key. The key immediately to the right of . /// - /// representing the a key. + /// representing the a key. public KeyControl aKey => this[Key.A]; /// - /// The 'b' key. The key in-between the to the left and the + /// The 'b' key. The key in-between the to the left and the /// to the right in the bottom-most row of alphabetic characters. /// - /// representing the b key. + /// representing the b key. public KeyControl bKey => this[Key.B]; /// - /// The 'c' key. The key in-between the to the left and the + /// The 'c' key. The key in-between the to the left and the /// to the right in the bottom-most row of alphabetic characters. /// - /// representing the c key. + /// representing the c key. public KeyControl cKey => this[Key.C]; /// - /// The 'd' key. The key in-between the to the left and the + /// The 'd' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the d key. + /// representing the d key. public KeyControl dKey => this[Key.D]; /// - /// The 'e' key. The key in-between the to the left and the + /// The 'e' key. The key in-between the to the left and the /// to the right in the topmost row of alphabetic characters. /// - /// representing the e key. + /// representing the e key. public KeyControl eKey => this[Key.E]; /// - /// The 'f' key. The key in-between the to the left and the + /// The 'f' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the f key. + /// representing the f key. public KeyControl fKey => this[Key.F]; /// - /// The 'g' key. The key in-between the to the left and the + /// The 'g' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the g key. + /// representing the g key. public KeyControl gKey => this[Key.G]; /// - /// The 'h' key. The key in-between the to the left and the + /// The 'h' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the h key. + /// representing the h key. public KeyControl hKey => this[Key.H]; /// - /// The 'i' key. The key in-between the to the left and the + /// The 'i' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the i key. + /// representing the i key. public KeyControl iKey => this[Key.I]; /// - /// The 'j' key. The key in-between the to the left and the + /// The 'j' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the j key. + /// representing the j key. public KeyControl jKey => this[Key.J]; /// - /// The 'k' key. The key in-between the to the left and the + /// The 'k' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the k key. + /// representing the k key. public KeyControl kKey => this[Key.K]; /// - /// The 'l' key. The key in-between the to the left and the + /// The 'l' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the l key. + /// representing the l key. public KeyControl lKey => this[Key.L]; /// - /// The 'm' key. The key in-between the to the left and the + /// The 'm' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// representing the m key. + /// representing the m key. public KeyControl mKey => this[Key.M]; /// - /// The 'n' key. The key in-between the to the left and the to + /// The 'n' key. The key in-between the to the left and the to /// the right in the bottom row of alphabetic characters. /// - /// representing the n key. + /// representing the n key. public KeyControl nKey => this[Key.N]; /// - /// The 'o' key. The key in-between the to the left and the to + /// The 'o' key. The key in-between the to the left and the to /// the right in the top row of alphabetic characters. /// - /// representing the o key. + /// representing the o key. public KeyControl oKey => this[Key.O]; /// - /// The 'p' key. The key in-between the to the left and the + /// The 'p' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the p key. + /// representing the p key. public KeyControl pKey => this[Key.P]; /// - /// The 'q' key. The key in-between the to the left and the + /// The 'q' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the q key. + /// representing the q key. public KeyControl qKey => this[Key.Q]; /// - /// The 'r' key. The key in-between the to the left and the + /// The 'r' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the r key. + /// representing the r key. public KeyControl rKey => this[Key.R]; /// - /// The 's' key. The key in-between the to the left and the + /// The 's' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the s key. + /// representing the s key. public KeyControl sKey => this[Key.S]; /// - /// The 't' key. The key in-between the to the left and the + /// The 't' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the t key. + /// representing the t key. public KeyControl tKey => this[Key.T]; /// - /// The 'u' key. The key in-between the to the left and the + /// The 'u' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the u key. + /// representing the u key. public KeyControl uKey => this[Key.U]; /// - /// The 'v' key. The key in-between the to the left and the + /// The 'v' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// representing the v key. + /// representing the v key. public KeyControl vKey => this[Key.V]; /// - /// The 'w' key. The key in-between the to the left and the + /// The 'w' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the w key. + /// representing the w key. public KeyControl wKey => this[Key.W]; /// - /// The 'x' key. The key in-between the to the left and the + /// The 'x' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// representing the x key. + /// representing the x key. public KeyControl xKey => this[Key.X]; /// - /// The 'y' key. The key in-between the to the left and the + /// The 'y' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the y key. + /// representing the y key. public KeyControl yKey => this[Key.Y]; /// - /// The 'z' key. The key in-between the to the left and the + /// The 'z' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// representing the z key. + /// representing the z key. public KeyControl zKey => this[Key.Z]; /// - /// The '1' key. The key in-between the to the left and the + /// The '1' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 1 key. + /// representing the 1 key. public KeyControl digit1Key => this[Key.Digit1]; /// - /// The '2' key. The key in-between the to the left and the + /// The '2' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 2 key. + /// representing the 2 key. public KeyControl digit2Key => this[Key.Digit2]; /// - /// The '3' key. The key in-between the to the left and the + /// The '3' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 3 key. + /// representing the 3 key. public KeyControl digit3Key => this[Key.Digit3]; /// - /// The '4' key. The key in-between the to the left and the + /// The '4' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 4 key. + /// representing the 4 key. public KeyControl digit4Key => this[Key.Digit4]; /// - /// The '5' key. The key in-between the to the left and the + /// The '5' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 5 key. + /// representing the 5 key. public KeyControl digit5Key => this[Key.Digit5]; /// - /// The '6' key. The key in-between the to the left and the + /// The '6' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 6 key. + /// representing the 6 key. public KeyControl digit6Key => this[Key.Digit6]; /// - /// The '7' key. The key in-between the to the left and the + /// The '7' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 7 key. + /// representing the 7 key. public KeyControl digit7Key => this[Key.Digit7]; /// - /// The '8' key. The key in-between the to the left and the + /// The '8' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 8 key. + /// representing the 8 key. public KeyControl digit8Key => this[Key.Digit8]; /// - /// The '9' key. The key in-between the to the left and the + /// The '9' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 9 key. + /// representing the 9 key. public KeyControl digit9Key => this[Key.Digit9]; /// - /// The '0' key. The key in-between the to the left and the + /// The '0' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 0 key. + /// representing the 0 key. public KeyControl digit0Key => this[Key.Digit0]; /// /// The shift key on the left side of the keyboard. /// - /// representing the left shift key. + /// representing the left shift key. public KeyControl leftShiftKey => this[Key.LeftShift]; /// /// The shift key on the right side of the keyboard. /// - /// representing the right shift key. + /// representing the right shift key. public KeyControl rightShiftKey => this[Key.RightShift]; /// /// The alt/option key on the left side of the keyboard. /// - /// representing the left alt/option key. + /// representing the left alt/option key. public KeyControl leftAltKey => this[Key.LeftAlt]; /// /// The alt/option key on the right side of the keyboard. /// - /// representing the right alt/option key. + /// representing the right alt/option key. public KeyControl rightAltKey => this[Key.RightAlt]; /// /// The control/ctrl key on the left side of the keyboard. /// - /// representing the left control key. + /// representing the left control key. public KeyControl leftCtrlKey => this[Key.LeftCtrl]; /// /// The control/ctrl key on the right side of the keyboard. /// - /// This key is usually not present on Mac laptops. - /// representing the right control key. + /// + /// This key is usually not present on Mac laptops. + /// representing the right control key. + /// public KeyControl rightCtrlKey => this[Key.RightCtrl]; /// /// The system "meta" key (Windows key on PC, Apple/command key on Mac) on the left /// side of the keyboard. /// - /// representing the left system meta key. + /// representing the left system meta key. public KeyControl leftMetaKey => this[Key.LeftMeta]; /// /// The system "meta" key (Windows key on PC, Apple/command key on Mac) on the right /// side of the keyboard. /// - /// representing the right system meta key. + /// representing the right system meta key. public KeyControl rightMetaKey => this[Key.RightMeta]; /// - /// Same as . Windows system key on left side of keyboard. + /// Same as . Windows system key on left side of keyboard. /// - /// representing the left Windows system key. + /// representing the left Windows system key. public KeyControl leftWindowsKey => this[Key.LeftWindows]; /// - /// Same as . Windows system key on right side of keyboard. + /// Same as . Windows system key on right side of keyboard. /// - /// representing the right Windows system key. + /// representing the right Windows system key. public KeyControl rightWindowsKey => this[Key.RightWindows]; /// - /// Same as . Apple/command system key on left side of keyboard. + /// Same as . Apple/command system key on left side of keyboard. /// - /// representing the left Apple/command system key. + /// representing the left Apple/command system key. public KeyControl leftAppleKey => this[Key.LeftApple]; /// - /// Same as . Apple/command system key on right side of keyboard. + /// Same as . Apple/command system key on right side of keyboard. /// - /// representing the right Apple/command system key. + /// representing the right Apple/command system key. public KeyControl rightAppleKey => this[Key.RightApple]; /// - /// Same as . Apple/command system key on left side of keyboard. + /// Same as . Apple/command system key on left side of keyboard. /// - /// representing the left Apple/command system key. + /// representing the left Apple/command system key. public KeyControl leftCommandKey => this[Key.LeftCommand]; /// - /// Same as . Apple/command system key on right side of keyboard. + /// Same as . Apple/command system key on right side of keyboard. /// - /// representing the right Apple/command system key. + /// representing the right Apple/command system key. public KeyControl rightCommandKey => this[Key.RightCommand]; /// /// The context menu key. This key is generally only found on PC keyboards. - /// If present, it is located in-between the and the - /// . It brings up the context menu according to the current selection. + /// If present, it is located in-between the and the + /// . It brings up the context menu according to the current selection. /// - /// representing the context menu key. + /// representing the context menu key. public KeyControl contextMenuKey => this[Key.ContextMenu]; /// /// The escape key, i.e. the key generally in the top left corner of the keyboard. - /// Usually to the left of . + /// Usually to the left of . /// - /// representing the escape key. + /// representing the escape key. public KeyControl escapeKey => this[Key.Escape]; /// /// The left arrow key. Usually in a block by itself and generally to the left - /// of . + /// of . /// - /// representing the left arrow key. + /// representing the left arrow key. public KeyControl leftArrowKey => this[Key.LeftArrow]; /// /// The right arrow key. Usually in a block by itself and generally to the right - /// of + /// of /// - /// representing the right arrow key. + /// representing the right arrow key. public KeyControl rightArrowKey => this[Key.RightArrow]; /// /// The up arrow key. Usually in a block by itself and generally on top of the - /// . + /// . /// - /// representing the up arrow key. + /// representing the up arrow key. public KeyControl upArrowKey => this[Key.UpArrow]; /// /// The down arrow key. Usually in a block by itself and generally below the - /// and in-between to the - /// left and to the right. + /// and in-between to the + /// left and to the right. /// - /// representing the down arrow key. + /// representing the down arrow key. public KeyControl downArrowKey => this[Key.DownArrow]; /// /// The backspace key (usually labeled "delete" on Mac). The rightmost key - /// in the top digit row with to the left. + /// in the top digit row with to the left. /// /// - /// representing the backspace key. + /// representing the backspace key. /// On the Mac, this key may be labeled "delete" which however is a - /// key different from . + /// key different from . /// public KeyControl backspaceKey => this[Key.Backspace]; /// - /// The page down key. Usually in a separate block with - /// to the left and above it. + /// The page down key. Usually in a separate block with + /// to the left and above it. /// - /// representing the page down key. + /// representing the page down key. public KeyControl pageDownKey => this[Key.PageDown]; /// - /// The page up key. Usually in a separate block with - /// to the left and below it. + /// The page up key. Usually in a separate block with + /// to the left and below it. /// - /// representing the page up key. + /// representing the page up key. public KeyControl pageUpKey => this[Key.PageUp]; /// - /// The 'home' key. Usually in a separate block with - /// to the right and to the left. + /// The 'home' key. Usually in a separate block with + /// to the right and to the left. /// - /// representing the insert key. + /// representing the insert key. public KeyControl homeKey => this[Key.Home]; /// - /// The 'end' key. Usually in a separate block with - /// to the left and to the right. + /// The 'end' key. Usually in a separate block with + /// to the left and to the right. /// - /// representing the end key. + /// representing the end key. public KeyControl endKey => this[Key.End]; /// - /// The 'insert' key. Usually in a separate block with - /// to its right and sitting below it. + /// The 'insert' key. Usually in a separate block with + /// to its right and sitting below it. /// - /// representing the insert key. + /// representing the insert key. public KeyControl insertKey => this[Key.Insert]; /// - /// The 'delete' key. Usually in a separate block with - /// to its right and sitting above it. + /// The 'delete' key. Usually in a separate block with + /// to its right and sitting above it. /// /// - /// representing the delete key. - /// On the Mac, the is also labeled "delete". + /// representing the delete key. + /// On the Mac, the is also labeled "delete". /// However, this is not this key. /// public KeyControl deleteKey => this[Key.Delete]; /// - /// The Caps Lock key. The key below and above - /// . + /// The Caps Lock key. The key below and above + /// . /// - /// representing the caps lock key. + /// representing the caps lock key. public KeyControl capsLockKey => this[Key.CapsLock]; /// - /// The Scroll Lock key. The key in-between the - /// to the left and the to the right. May also + /// The Scroll Lock key. The key in-between the + /// to the left and the to the right. May also /// be labeled "F14". /// - /// representing the scroll lock key. + /// representing the scroll lock key. public KeyControl scrollLockKey => this[Key.ScrollLock]; /// @@ -1706,80 +1708,80 @@ public string keyboardLayout /// numpad and which usually toggles the numpad between generating /// digits and triggering functions like "insert" etc. instead. /// - /// representing the num lock key. + /// representing the num lock key. public KeyControl numLockKey => this[Key.NumLock]; /// - /// The Print Screen key. The key sitting in-between - /// to the left and to the right. May also + /// The Print Screen key. The key sitting in-between + /// to the left and to the right. May also /// be labeled "F13". /// - /// representing the print screen key. + /// representing the print screen key. public KeyControl printScreenKey => this[Key.PrintScreen]; /// - /// The pause/break key. The key sitting to the left of . + /// The pause/break key. The key sitting to the left of . /// May also be labeled "F15". /// - /// representing the pause/break key. + /// representing the pause/break key. public KeyControl pauseKey => this[Key.Pause]; /// /// The enter key on the numpad. The key sitting in the bottom right corner /// of the numpad. /// - /// representing the numpad enter key. + /// representing the numpad enter key. public KeyControl numpadEnterKey => this[Key.NumpadEnter]; /// - /// The divide ('/') key on the numpad. The key in-between - /// to the left and to the right. + /// The divide ('/') key on the numpad. The key in-between + /// to the left and to the right. /// /// - /// representing the numpad divide key. + /// representing the numpad divide key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad - /// divide key usually is the on PC keyboards. + /// divide key usually is the on PC keyboards. /// public KeyControl numpadDivideKey => this[Key.NumpadDivide]; /// /// The multiply ('*') key on the numpad. The key in the upper right corner of the numpad - /// with to the left and + /// with to the left and /// below it. /// /// - /// representing the numpad multiply key. + /// representing the numpad multiply key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad - /// multiply key usually is the on PC keyboards. + /// multiply key usually is the on PC keyboards. /// public KeyControl numpadMultiplyKey => this[Key.NumpadMultiply]; /// /// The minus ('-') key on the numpad. The key on the right side of the numpad with - /// above it and below it. + /// above it and below it. /// /// - /// representing the numpad minus key. + /// representing the numpad minus key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad /// minus key is usually not present on PC keyboards. Instead, the 17-key layout - /// has an elongated that covers the space of two keys. + /// has an elongated that covers the space of two keys. /// public KeyControl numpadMinusKey => this[Key.NumpadMinus]; /// /// The plus ('+') key on the numpad. The key on the right side of the numpad with - /// above it and below it. + /// above it and below it. /// /// - /// representing the numpad plus key. + /// representing the numpad plus key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. /// /// In particular, the plus key on the numpad is usually an elongated key that covers - /// the space of two keys. These 17-key numpads do not usually have a + /// the space of two keys. These 17-key numpads do not usually have a /// and the key above the plus key will usually be the numpad minus key. /// /// However, both on a 17-key and 18-key numpad, the plus key references the same physical key. @@ -1787,21 +1789,21 @@ public string keyboardLayout public KeyControl numpadPlusKey => this[Key.NumpadPlus]; /// - /// The period ('.') key on the numpad. The key in-between the - /// to the right and the to the left. + /// The period ('.') key on the numpad. The key in-between the + /// to the right and the to the left. /// /// - /// representing the numpad period key. + /// representing the numpad period key. /// This key is the same in 17-key and 18-key numpad layouts. /// public KeyControl numpadPeriodKey => this[Key.NumpadPeriod]; /// - /// The equals ('=') key on the numpad. The key in-between to the left - /// and to the right in the top row of the numpad. + /// The equals ('=') key on the numpad. The key in-between to the left + /// and to the right in the top row of the numpad. /// /// - /// representing the numpad equals key. + /// representing the numpad equals key. /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. /// @@ -1814,165 +1816,165 @@ public string keyboardLayout /// The 0 key on the numpad. The key in the bottom left corner of the numpad. Usually /// and elongated key. /// - /// representing the numpad 0 key. + /// representing the numpad 0 key. public KeyControl numpad0Key => this[Key.Numpad0]; /// - /// The 1 key on the numpad. The key on the left side of the numpad with - /// below it and above it. + /// The 1 key on the numpad. The key on the left side of the numpad with + /// below it and above it. /// - /// representing the numpad 1 key. + /// representing the numpad 1 key. public KeyControl numpad1Key => this[Key.Numpad1]; /// - /// The 2 key on the numpad. The key with the to its left and - /// the to its right. + /// The 2 key on the numpad. The key with the to its left and + /// the to its right. /// - /// representing the numpad 2 key. + /// representing the numpad 2 key. public KeyControl numpad2Key => this[Key.Numpad2]; /// - /// The 3 key on the numpad. The key with the to its left and - /// the to its right. + /// The 3 key on the numpad. The key with the to its left and + /// the to its right. /// - /// representing the numpad 3 key. + /// representing the numpad 3 key. public KeyControl numpad3Key => this[Key.Numpad3]; /// - /// The 4 key on the numpad. The key on the left side of the numpad with the - /// below it and the above it. + /// The 4 key on the numpad. The key on the left side of the numpad with the + /// below it and the above it. /// - /// representing the numpad 4 key. + /// representing the numpad 4 key. public KeyControl numpad4Key => this[Key.Numpad4]; /// - /// The 5 key on the numpad. The key in-between the to the left and the - /// to the right. + /// The 5 key on the numpad. The key in-between the to the left and the + /// to the right. /// - /// representing the numpad 5 key. + /// representing the numpad 5 key. public KeyControl numpad5Key => this[Key.Numpad5]; /// - /// The 6 key on the numpad. The key in-between the to the let and - /// the to the right. + /// The 6 key on the numpad. The key in-between the to the let and + /// the to the right. /// - /// representing the numpad 6 key. + /// representing the numpad 6 key. public KeyControl numpad6Key => this[Key.Numpad6]; /// - /// The 7 key on the numpad. The key on the left side of the numpad with - /// below it and above it. + /// The 7 key on the numpad. The key on the left side of the numpad with + /// below it and above it. /// - /// representing the numpad 7 key. + /// representing the numpad 7 key. public KeyControl numpad7Key => this[Key.Numpad7]; /// - /// The 8 key on the numpad. The key in-between the to the left and the - /// to the right. + /// The 8 key on the numpad. The key in-between the to the left and the + /// to the right. /// - /// representing the numpad 8 key. + /// representing the numpad 8 key. public KeyControl numpad8Key => this[Key.Numpad8]; /// - /// The 9 key on the numpad. The key in-between the to the left and - /// the to the right (or, on 17-key PC keyboard numpads, the elongated + /// The 9 key on the numpad. The key in-between the to the left and + /// the to the right (or, on 17-key PC keyboard numpads, the elongated /// plus key). /// - /// representing the numpad 9 key. + /// representing the numpad 9 key. public KeyControl numpad9Key => this[Key.Numpad9]; /// - /// The F1 key. The key in-between to the left and + /// The F1 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F1 key. + /// representing the F1 key. public KeyControl f1Key => this[Key.F1]; /// - /// The F2 key. The key in-between to the left and + /// The F2 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F2 key. + /// representing the F2 key. public KeyControl f2Key => this[Key.F2]; /// - /// The F3 key. The key in-between to the left and + /// The F3 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F3 key. + /// representing the F3 key. public KeyControl f3Key => this[Key.F3]; /// - /// The F4 key. The key in-between to the left and + /// The F4 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F4 key. + /// representing the F4 key. public KeyControl f4Key => this[Key.F4]; /// - /// The F5 key. The key in-between to the left and + /// The F5 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F5 key. + /// representing the F5 key. public KeyControl f5Key => this[Key.F5]; /// - /// The F6 key. The key in-between to the left and + /// The F6 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F6 key. + /// representing the F6 key. public KeyControl f6Key => this[Key.F6]; /// - /// The F7 key. The key in-between to the left and + /// The F7 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F7 key. + /// representing the F7 key. public KeyControl f7Key => this[Key.F7]; /// - /// The F8 key. The key in-between to the left and + /// The F8 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F8 key. + /// representing the F8 key. public KeyControl f8Key => this[Key.F8]; /// - /// The F9 key. The key in-between to the left and + /// The F9 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F9 key. + /// representing the F9 key. public KeyControl f9Key => this[Key.F9]; /// - /// The F10 key. The key in-between to the left and + /// The F10 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F10 key. + /// representing the F10 key. public KeyControl f10Key => this[Key.F10]; /// - /// The F11 key. The key in-between to the left and + /// The F11 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F11 key. + /// representing the F11 key. public KeyControl f11Key => this[Key.F11]; /// - /// The F12 key. The key in-between to the left and + /// The F12 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F12 key. + /// representing the F12 key. public KeyControl f12Key => this[Key.F12]; /// /// First additional key on the keyboard. /// /// - /// representing . + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -1984,10 +1986,10 @@ public string keyboardLayout /// Second additional key on the keyboard. /// /// - /// representing . + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -1999,10 +2001,10 @@ public string keyboardLayout /// Third additional key on the keyboard. /// /// - /// representing . + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -2014,10 +2016,10 @@ public string keyboardLayout /// Fourth additional key on the keyboard. /// /// - /// representing . + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -2029,10 +2031,10 @@ public string keyboardLayout /// Fifth additional key on the keyboard. /// /// - /// representing . + /// representing . /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -2041,44 +2043,44 @@ public string keyboardLayout public KeyControl oem5Key => this[Key.OEM5]; /// - /// An artificial combination of and into one control. + /// An artificial combination of and into one control. /// /// - /// representing a combined left and right shift key. - /// This is a button which is considered pressed whenever the left and/or + /// representing a combined left and right shift key. + /// This is a button which is considered pressed whenever the left and/or /// right shift key is pressed. /// public ButtonControl shiftKey { get; protected set; } /// - /// An artificial combination of and into one control. + /// An artificial combination of and into one control. /// /// - /// representing a combined left and right ctrl key. - /// This is a button which is considered pressed whenever the left and/or + /// representing a combined left and right ctrl key. + /// This is a button which is considered pressed whenever the left and/or /// right ctrl key is pressed. /// public ButtonControl ctrlKey { get; protected set; } /// - /// An artificial combination of and into one control. + /// An artificial combination of and into one control. /// /// - /// representing a combined left and right alt key. - /// This is a button which is considered pressed whenever the left and/or + /// representing a combined left and right alt key. + /// This is a button which is considered pressed whenever the left and/or /// right alt key is pressed. /// public ButtonControl altKey { get; protected set; } /// - /// True when IME composition is enabled. Requires to be called to enable IME, and the user to enable it at the OS level. + /// True when IME composition is enabled. Requires to be called to enable IME, and the user to enable it at the OS level. /// /// - /// representing a combined left and right alt key. + /// representing a combined left and right alt key. /// Some languages use complex input methods which involve opening windows to insert characters. /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. /// - /// See for turning IME on/off + /// See for turning IME on/off /// public ButtonControl imeSelected { get; protected set; } @@ -2086,9 +2088,9 @@ public string keyboardLayout /// Look up a key control by its key code. /// /// Key code of key control to return. - /// The given is not valid. + /// The given is not valid. /// - /// representing a combined left and right alt key. + /// representing a combined left and right alt key. /// This is equivalent to allKeys[(int)key - 1]. /// public KeyControl this[Key key] @@ -2118,7 +2120,7 @@ public KeyControl this[Key key] /// /// A keyboard will automatically be made current when receiving input or when /// added to the input system. - /// The currently active keyboard is tracked in . + /// The currently active keyboard is tracked in . /// /// /// @@ -2324,8 +2326,8 @@ protected override void RefreshConfiguration() /// /// Char value that represents the character that has been entered. /// - /// The system will call this method automatically whenever a is - /// received that targets the keyboard device. Subscribe to this event by using . + /// The system will call this method automatically whenever a is + /// received that targets the keyboard device. Subscribe to this event by using . /// /// /// @@ -2349,7 +2351,7 @@ public void OnTextInput(char character) } /// - /// Return the key control that, according to the currently active keyboard layout (see ), + /// Return the key control that, according to the currently active keyboard layout (see ), /// is associated with the given text. /// /// Display name reported for the key according to the currently active keyboard layout. @@ -2388,9 +2390,9 @@ public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) /// /// This is called to set the IME composition strings. Fired once for every change containing the entire string to date. /// - /// The for the IME composition. + /// The for the IME composition. /// - /// To call back to the changed composition string, subscribe to the event. + /// To call back to the changed composition string, subscribe to the event. /// /// /// From 58eeef63ae15b8a2e4fd38e838159d003ab9bc3c Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 14:51:18 +0100 Subject: [PATCH 09/24] inherit documentation for MakeCurrent --- .../com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 927d9f5639..6098177804 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -2114,9 +2114,7 @@ public KeyControl this[Key key] /// public static Keyboard current { get; private set; } - /// - /// Make a keyboard the current active keyboard. - /// + /// /// /// A keyboard will automatically be made current when receiving input or when /// added to the input system. From 8ad97b6e1a384f347459dbfa06ba72c998464ce4 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 15:45:30 +0100 Subject: [PATCH 10/24] formatting small text adjustments --- .../InputSystem/Devices/Keyboard.cs | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 6098177804..b05f6e1db3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -927,7 +927,6 @@ public class Keyboard : InputDevice, ITextInputReceiver /// Total number of key controls on a keyboard, i.e. the number of controls /// in . /// - /// The integer value represents the total number of key controls. public const int KeyCount = (int)Key.OEM5; /// @@ -1022,7 +1021,6 @@ public event Action onTextInput /// /// /// To subscribe to the onIMECompositionChange event, use the following sample code: - /// /// /// using UnityEngine; /// using UnityEngine.InputSystem; @@ -1065,7 +1063,7 @@ public event Action onIMECompositionChange /// for more IME settings and data. /// /// - /// The new IME composition enabled state. True to enable the IME, false to disable it. + /// The IME composition enabled state. to enable the IME, to disable it. /// /// /// @@ -1637,6 +1635,7 @@ public string keyboardLayout /// /// /// representing the backspace key. + /// /// On the Mac, this key may be labeled "delete" which however is a /// key different from . /// @@ -1683,6 +1682,7 @@ public string keyboardLayout /// /// /// representing the delete key. + /// /// On the Mac, the is also labeled "delete". /// However, this is not this key. /// @@ -1739,6 +1739,7 @@ public string keyboardLayout /// /// /// representing the numpad divide key. + /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad /// divide key usually is the on PC keyboards. @@ -1752,6 +1753,7 @@ public string keyboardLayout /// /// /// representing the numpad multiply key. + /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad /// multiply key usually is the on PC keyboards. @@ -1764,6 +1766,7 @@ public string keyboardLayout /// /// /// representing the numpad minus key. + /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad /// minus key is usually not present on PC keyboards. Instead, the 17-key layout @@ -1777,6 +1780,7 @@ public string keyboardLayout /// /// /// representing the numpad plus key. + /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. /// @@ -1794,6 +1798,7 @@ public string keyboardLayout /// /// /// representing the numpad period key. + /// /// This key is the same in 17-key and 18-key numpad layouts. /// public KeyControl numpadPeriodKey => this[Key.NumpadPeriod]; @@ -1804,6 +1809,7 @@ public string keyboardLayout /// /// /// representing the numpad equals key. + /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. /// @@ -1972,6 +1978,7 @@ public string keyboardLayout /// /// /// representing . + /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -1987,6 +1994,7 @@ public string keyboardLayout /// /// /// representing . + /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -2002,6 +2010,7 @@ public string keyboardLayout /// /// /// representing . + /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -2017,6 +2026,7 @@ public string keyboardLayout /// /// /// representing . + /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -2032,6 +2042,7 @@ public string keyboardLayout /// /// /// representing . + /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional /// key in-between and . @@ -2047,6 +2058,7 @@ public string keyboardLayout /// /// /// representing a combined left and right shift key. + /// /// This is a button which is considered pressed whenever the left and/or /// right shift key is pressed. /// @@ -2057,6 +2069,7 @@ public string keyboardLayout /// /// /// representing a combined left and right ctrl key. + /// /// This is a button which is considered pressed whenever the left and/or /// right ctrl key is pressed. /// @@ -2067,6 +2080,7 @@ public string keyboardLayout /// /// /// representing a combined left and right alt key. + /// /// This is a button which is considered pressed whenever the left and/or /// right alt key is pressed. /// @@ -2076,9 +2090,8 @@ public string keyboardLayout /// True when IME composition is enabled. Requires to be called to enable IME, and the user to enable it at the OS level. /// /// - /// representing a combined left and right alt key. /// Some languages use complex input methods which involve opening windows to insert characters. - /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. + /// Typically, this is not desirable while playing a game, as games may just interpret keystrokes as game input, not as text. /// /// See for turning IME on/off /// @@ -2090,7 +2103,6 @@ public string keyboardLayout /// Key code of key control to return. /// The given is not valid. /// - /// representing a combined left and right alt key. /// This is equivalent to allKeys[(int)key - 1]. /// public KeyControl this[Key key] @@ -2322,7 +2334,7 @@ protected override void RefreshConfiguration() /// /// Called when text input on the keyboard is received. /// - /// Char value that represents the character that has been entered. + /// A char type value that represents the character that has been entered. /// /// The system will call this method automatically whenever a is /// received that targets the keyboard device. Subscribe to this event by using . From ec93f2503c29bb54518496fb66691e20aa50f4de Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 15:50:41 +0100 Subject: [PATCH 11/24] added type reference for char --- Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index b05f6e1db3..bc91ea87eb 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -2334,7 +2334,7 @@ protected override void RefreshConfiguration() /// /// Called when text input on the keyboard is received. /// - /// A char type value that represents the character that has been entered. + /// A type value that represents the character that has been entered. /// /// The system will call this method automatically whenever a is /// received that targets the keyboard device. Subscribe to this event by using . From e4cfd6a11853801d90c2426053a1fff735ea2e21 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 16:36:41 +0100 Subject: [PATCH 12/24] use instead of --- .../InputSystem/Devices/Keyboard.cs | 826 +++++++++--------- 1 file changed, 413 insertions(+), 413 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index bc91ea87eb..90692e034f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -16,7 +16,7 @@ namespace UnityEngine.InputSystem.LowLevel /// Default state layout for keyboards. /// /// - /// Can be used to update the state of devices. + /// Can be used to update the state of devices. /// /// /// @@ -36,7 +36,7 @@ namespace UnityEngine.InputSystem.LowLevel /// /// /// - /// + /// // NOTE: This layout has to match the KeyboardInputState layout used in native! [StructLayout(LayoutKind.Sequential)] public unsafe struct KeyboardState : IInputStateTypeInfo @@ -44,7 +44,7 @@ public unsafe struct KeyboardState : IInputStateTypeInfo /// /// Memory format tag for KeyboardState. Returns "KEYS". /// - /// + /// public static FourCC Format => new FourCC('K', 'E', 'Y', 'S'); private const int kSizeInBits = Keyboard.KeyCount; @@ -215,7 +215,7 @@ namespace UnityEngine.InputSystem /// so that pressing a key in the same location on different keyboards should result in the same action /// regardless of what is printed on a key or what current system language is set. /// - /// This means, for example, that is always the key to the right of , + /// This means, for example, that is always the key to the right of , /// regardless of which key (if any) produces the "a" character on the current keyboard layout. /// /// Unity relies on physical hardware in the keyboards to report same USB HID "usage" for the keys in @@ -223,12 +223,12 @@ namespace UnityEngine.InputSystem /// might report different data, and this is outside of Unity's control. /// /// For this reason, you should not use key codes to read text input. - /// Instead, you should use the callback. + /// Instead, you should use the callback. /// The `onTextInput` callback provides you with the actual text characters which correspond /// to the symbols printed on a keyboard, based on the end user's current system language layout. /// /// To find the text character (if any) generated by a key according to the currently active keyboard - /// layout, use the property of . + /// layout, use the property of . /// /// /// @@ -262,252 +262,252 @@ public enum Key // ---- Printable keys ---- /// - /// The . + /// The . /// Space, /// - /// The . + /// The . /// Enter, /// - /// The . + /// The . /// Tab, /// - /// The . + /// The . /// Backquote, /// - /// The . + /// The . /// Quote, /// - /// The . + /// The . /// Semicolon, /// - /// The . + /// The . /// Comma, /// - /// The . + /// The . /// Period, /// - /// The . + /// The . /// Slash, /// - /// The . + /// The . /// Backslash, /// - /// The . + /// The . /// LeftBracket, /// - /// The . + /// The . /// RightBracket, /// - /// The . + /// The . /// Minus, /// - /// The . + /// The . /// Equals, /// - /// The . + /// The . /// A, /// - /// The . + /// The . /// B, /// - /// The . + /// The . /// C, /// - /// The . + /// The . /// D, /// - /// The . + /// The . /// E, /// - /// The . + /// The . /// F, /// - /// The . + /// The . /// G, /// - /// The . + /// The . /// H, /// - /// The . + /// The . /// I, /// - /// The . + /// The . /// J, /// - /// The . + /// The . /// K, /// - /// The . + /// The . /// L, /// - /// The . + /// The . /// M, /// - /// The . + /// The . /// N, /// - /// The . + /// The . /// O, /// - /// The . + /// The . /// P, /// - /// The . + /// The . /// Q, /// - /// The . + /// The . /// R, /// - /// The . + /// The . /// S, /// - /// The . + /// The . /// T, /// - /// The . + /// The . /// U, /// - /// The . + /// The . /// V, /// - /// The . + /// The . /// W, /// - /// The . + /// The . /// X, /// - /// The . + /// The . /// Y, /// - /// The . + /// The . /// Z, /// - /// The . + /// The . /// Digit1, /// - /// The . + /// The . /// Digit2, /// - /// The . + /// The . /// Digit3, /// - /// The . + /// The . /// Digit4, /// - /// The . + /// The . /// Digit5, /// - /// The . + /// The . /// Digit6, /// - /// The . + /// The . /// Digit7, /// - /// The . + /// The . /// Digit8, /// - /// The . + /// The . /// Digit9, /// - /// The . + /// The . /// Digit0, @@ -516,167 +516,167 @@ public enum Key // NOTE: The left&right variants for shift, ctrl, and alt must be next to each other. /// - /// The . + /// The . /// LeftShift, /// - /// The . + /// The . /// RightShift, /// - /// The . + /// The . /// LeftAlt, /// - /// The . + /// The . /// RightAlt, /// - /// Same as . + /// Same as . /// AltGr = RightAlt, /// - /// The . + /// The . /// LeftCtrl, /// - /// The . + /// The . /// RightCtrl, /// - /// The . + /// The . /// LeftMeta, /// - /// The . + /// The . /// RightMeta, /// - /// Same as . + /// Same as . /// LeftWindows = LeftMeta, /// - /// Same as . + /// Same as . /// RightWindows = RightMeta, /// - /// Same as . + /// Same as . /// LeftApple = LeftMeta, /// - /// Same as . + /// Same as . /// RightApple = RightMeta, /// - /// Same as . + /// Same as . /// LeftCommand = LeftMeta, /// - /// Same as . + /// Same as . /// RightCommand = RightMeta, /// - /// The . + /// The . /// ContextMenu, /// - /// The . + /// The . /// Escape, /// - /// The . + /// The . /// LeftArrow, /// - /// The . + /// The . /// RightArrow, /// - /// The . + /// The . /// UpArrow, /// - /// The . + /// The . /// DownArrow, /// - /// The . + /// The . /// Backspace, /// - /// The . + /// The . /// PageDown, /// - /// The . + /// The . /// PageUp, /// - /// The . + /// The . /// Home, /// - /// The . + /// The . /// End, /// - /// The . + /// The . /// Insert, /// - /// The . + /// The . /// Delete, /// - /// The . + /// The . /// CapsLock, /// - /// The . + /// The . /// NumLock, /// - /// The . + /// The . /// PrintScreen, /// - /// The . + /// The . /// ScrollLock, /// - /// The . + /// The . /// Pause, @@ -688,147 +688,147 @@ public enum Key // layout neutral here, too, and always use the 18-key blueprint. /// - /// The . + /// The . /// NumpadEnter, /// - /// The . + /// The . /// NumpadDivide, /// - /// The . + /// The . /// NumpadMultiply, /// - /// The . + /// The . /// NumpadPlus, /// - /// The . + /// The . /// NumpadMinus, /// - /// The . + /// The . /// NumpadPeriod, /// - /// The . + /// The . /// NumpadEquals, /// - /// The . + /// The . /// Numpad0, /// - /// The . + /// The . /// Numpad1, /// - /// The . + /// The . /// Numpad2, /// - /// The . + /// The . /// Numpad3, /// - /// The . + /// The . /// Numpad4, /// - /// The . + /// The . /// Numpad5, /// - /// The . + /// The . /// Numpad6, /// - /// The . + /// The . /// Numpad7, /// - /// The . + /// The . /// Numpad8, /// - /// The . + /// The . /// Numpad9, /// - /// The . + /// The . /// F1, /// - /// The . + /// The . /// F2, /// - /// The . + /// The . /// F3, /// - /// The . + /// The . /// F4, /// - /// The . + /// The . /// F5, /// - /// The . + /// The . /// F6, /// - /// The . + /// The . /// F7, /// - /// The . + /// The . /// F8, /// - /// The . + /// The . /// F9, /// - /// The . + /// The . /// F10, /// - /// The . + /// The . /// F11, /// - /// The . + /// The . /// F12, @@ -836,27 +836,27 @@ public enum Key // they end up on the keyboard (if they are present). /// - /// The . + /// The . /// OEM1, /// - /// The . + /// The . /// OEM2, /// - /// The . + /// The . /// OEM3, /// - /// The . + /// The . /// OEM4, /// - /// The . + /// The . /// OEM5, @@ -870,14 +870,14 @@ public enum Key /// /// /// Keyboards allow for both individual button input as well as text input. To receive button - /// input, use the individual -type controls present on the keyboard. - /// For example, . To receive text input, use the + /// input, use the individual -type controls present on the keyboard. + /// For example, . To receive text input, use the /// callback. /// - /// The naming/identification of keys is agnostic to keyboard layouts. This means that , - /// for example, will always be the key to the right of regardless of where + /// The naming/identification of keys is agnostic to keyboard layouts. This means that , + /// for example, will always be the key to the right of regardless of where /// the current keyboard language layout puts the "a" character. This also means that having a - /// binding to "<Keyboard>/a" on an , for example, will + /// binding to "<Keyboard>/a" on an , for example, will /// bind to the same key regardless of locale -- an important feature, for example, for getting /// stable WASD bindings. /// @@ -886,11 +886,11 @@ public enum Key /// "<Keyboard>/#(a)", for example, will bind to the key that produces the "a" /// character according to the currently active keyboard layout. /// - /// To find out which keyboard layout is currently active, you can use the + /// To find out which keyboard layout is currently active, you can use the /// property. Note that keyboard layout names are platform-dependent. /// /// Note that keyboard devices will always have key controls added for all keys in the - /// enumeration -- whether they are actually present on the physical + /// enumeration -- whether they are actually present on the physical /// keyboard or not. It is thus not possible to find out this way whether the underlying /// keyboard has certain keys or not. /// @@ -919,19 +919,19 @@ public enum Key /// } /// /// - /// + /// [InputControlLayout(stateType = typeof(KeyboardState), isGenericTypeOfDevice = true)] public class Keyboard : InputDevice, ITextInputReceiver { /// /// Total number of key controls on a keyboard, i.e. the number of controls - /// in . + /// in . /// public const int KeyCount = (int)Key.OEM5; /// /// Event that is fired for every single character entered on the keyboard. - /// See . + /// See . /// /// /// @@ -1008,8 +1008,8 @@ public event Action onTextInput /// When using an IME, this event can be used to display the composition string while it is being edited. /// /// - /// The composition string is held by the struct. - /// When a composition string is submitted, one or many events will fire with the submitted characters. + /// The composition string is held by the struct. + /// When a composition string is submitted, one or many events will fire with the submitted characters. /// /// Some languages use complex input methods which involve opening windows to insert characters. /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. @@ -1017,7 +1017,7 @@ public event Action onTextInput /// Many IMEs cause this event to fire with a blank string when the composition is submitted or reset, however it is best /// not to rely on this behaviour since it is IME dependent. /// - /// See for turning IME on/off + /// See for turning IME on/off /// /// /// To subscribe to the onIMECompositionChange event, use the following sample code: @@ -1059,8 +1059,8 @@ public event Action onIMECompositionChange /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. /// Setting this to On, will enable the OS-level IME system when the user presses keystrokes. /// - /// See , , - /// for more IME settings and data. + /// See , , + /// for more IME settings and data. /// /// /// The IME composition enabled state. to enable the IME, to disable it. @@ -1097,7 +1097,7 @@ public void SetIMEEnabled(bool enabled) /// Some languages use complex input methods which involve opening windows to insert characters. /// Typically, this is not desirable while playing a game, as games may just interpret key strokes as game input, not as text. /// - /// See for turning IME on/off + /// See for turning IME on/off /// /// /// A Vector2 of the IME cursor position to set. @@ -1137,7 +1137,7 @@ public void SetIMECursorPosition(Vector2 position) /// The value of this property reflects the currently used layout and thus changes /// whenever the layout of the system or the one for the application is changed. /// - /// To determine what a key represents in the current layout, use . + /// To determine what a key represents in the current layout, use . /// public string keyboardLayout { @@ -1152,378 +1152,378 @@ public string keyboardLayout /// /// A synthetic button control that is considered pressed if any key on the keyboard is pressed. /// - /// representing the synthetic "anyKey". + /// representing the synthetic "anyKey". public AnyKeyControl anyKey { get; protected set; } /// /// The space bar key at the bottom of the keyboard. /// - /// representing the space bar key. + /// representing the space bar key. public KeyControl spaceKey => this[Key.Space]; /// /// The enter/return key in the main key block. /// /// - /// representing the enter key. - /// This key is distinct from the enter key on the numpad which is . + /// representing the enter key. + /// This key is distinct from the enter key on the numpad which is . /// public KeyControl enterKey => this[Key.Enter]; /// - /// The tab key, located on the left side above the . + /// The tab key, located on the left side above the . /// - /// representing the tab key. + /// representing the tab key. public KeyControl tabKey => this[Key.Tab]; /// - /// The ` key. The leftmost key in the row of digits. Directly above . + /// The ` key. The leftmost key in the row of digits. Directly above . /// - /// representing the backtick/quote key. + /// representing the backtick/quote key. public KeyControl backquoteKey => this[Key.Backquote]; /// - /// The ' key. The key immediately to the left of . + /// The ' key. The key immediately to the left of . /// - /// representing the quote key. + /// representing the quote key. public KeyControl quoteKey => this[Key.Quote]; /// - /// The ';' key. The key immediately to the left of . + /// The ';' key. The key immediately to the left of . /// - /// representing the semicolon key. + /// representing the semicolon key. public KeyControl semicolonKey => this[Key.Semicolon]; /// - /// The ',' key. Third key to the left of . + /// The ',' key. Third key to the left of . /// - /// representing the comma key. + /// representing the comma key. public KeyControl commaKey => this[Key.Comma]; /// - /// The '.' key. Second key to the left of . + /// The '.' key. Second key to the left of . /// - /// representing the period key. + /// representing the period key. public KeyControl periodKey => this[Key.Period]; /// - /// The '/' key. The key immediately to the left of . + /// The '/' key. The key immediately to the left of . /// - /// representing the forward slash key. + /// representing the forward slash key. public KeyControl slashKey => this[Key.Slash]; /// - /// The '\' key. The key immediately to the right of and - /// next to or above . + /// The '\' key. The key immediately to the right of and + /// next to or above . /// - /// representing the backslash key. + /// representing the backslash key. public KeyControl backslashKey => this[Key.Backslash]; /// - /// The '[' key. The key immediately to the left of . + /// The '[' key. The key immediately to the left of . /// - /// representing the left bracket key. + /// representing the left bracket key. public KeyControl leftBracketKey => this[Key.LeftBracket]; /// - /// The ']' key. The key in-between to the left and - /// to the right. + /// The ']' key. The key in-between to the left and + /// to the right. /// - /// representing the right bracket key. + /// representing the right bracket key. public KeyControl rightBracketKey => this[Key.RightBracket]; /// - /// The '-' key. The second key to the left of . + /// The '-' key. The second key to the left of . /// - /// representing the minus key. + /// representing the minus key. public KeyControl minusKey => this[Key.Minus]; /// - /// The '=' key in the main key block. The key in-between to the left - /// and to the right. + /// The '=' key in the main key block. The key in-between to the left + /// and to the right. /// - /// representing the equals key. + /// representing the equals key. public KeyControl equalsKey => this[Key.Equals]; /// - /// The 'a' key. The key immediately to the right of . + /// The 'a' key. The key immediately to the right of . /// - /// representing the a key. + /// representing the a key. public KeyControl aKey => this[Key.A]; /// - /// The 'b' key. The key in-between the to the left and the + /// The 'b' key. The key in-between the to the left and the /// to the right in the bottom-most row of alphabetic characters. /// - /// representing the b key. + /// representing the b key. public KeyControl bKey => this[Key.B]; /// - /// The 'c' key. The key in-between the to the left and the + /// The 'c' key. The key in-between the to the left and the /// to the right in the bottom-most row of alphabetic characters. /// - /// representing the c key. + /// representing the c key. public KeyControl cKey => this[Key.C]; /// - /// The 'd' key. The key in-between the to the left and the + /// The 'd' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the d key. + /// representing the d key. public KeyControl dKey => this[Key.D]; /// - /// The 'e' key. The key in-between the to the left and the + /// The 'e' key. The key in-between the to the left and the /// to the right in the topmost row of alphabetic characters. /// - /// representing the e key. + /// representing the e key. public KeyControl eKey => this[Key.E]; /// - /// The 'f' key. The key in-between the to the left and the + /// The 'f' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the f key. + /// representing the f key. public KeyControl fKey => this[Key.F]; /// - /// The 'g' key. The key in-between the to the left and the + /// The 'g' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the g key. + /// representing the g key. public KeyControl gKey => this[Key.G]; /// - /// The 'h' key. The key in-between the to the left and the + /// The 'h' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the h key. + /// representing the h key. public KeyControl hKey => this[Key.H]; /// - /// The 'i' key. The key in-between the to the left and the + /// The 'i' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the i key. + /// representing the i key. public KeyControl iKey => this[Key.I]; /// - /// The 'j' key. The key in-between the to the left and the + /// The 'j' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the j key. + /// representing the j key. public KeyControl jKey => this[Key.J]; /// - /// The 'k' key. The key in-between the to the left and the + /// The 'k' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the k key. + /// representing the k key. public KeyControl kKey => this[Key.K]; /// - /// The 'l' key. The key in-between the to the left and the + /// The 'l' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the l key. + /// representing the l key. public KeyControl lKey => this[Key.L]; /// - /// The 'm' key. The key in-between the to the left and the + /// The 'm' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// representing the m key. + /// representing the m key. public KeyControl mKey => this[Key.M]; /// - /// The 'n' key. The key in-between the to the left and the to + /// The 'n' key. The key in-between the to the left and the to /// the right in the bottom row of alphabetic characters. /// - /// representing the n key. + /// representing the n key. public KeyControl nKey => this[Key.N]; /// - /// The 'o' key. The key in-between the to the left and the to + /// The 'o' key. The key in-between the to the left and the to /// the right in the top row of alphabetic characters. /// - /// representing the o key. + /// representing the o key. public KeyControl oKey => this[Key.O]; /// - /// The 'p' key. The key in-between the to the left and the + /// The 'p' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the p key. + /// representing the p key. public KeyControl pKey => this[Key.P]; /// - /// The 'q' key. The key in-between the to the left and the + /// The 'q' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the q key. + /// representing the q key. public KeyControl qKey => this[Key.Q]; /// - /// The 'r' key. The key in-between the to the left and the + /// The 'r' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the r key. + /// representing the r key. public KeyControl rKey => this[Key.R]; /// - /// The 's' key. The key in-between the to the left and the + /// The 's' key. The key in-between the to the left and the /// to the right in the middle row of alphabetic characters. /// - /// representing the s key. + /// representing the s key. public KeyControl sKey => this[Key.S]; /// - /// The 't' key. The key in-between the to the left and the + /// The 't' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the t key. + /// representing the t key. public KeyControl tKey => this[Key.T]; /// - /// The 'u' key. The key in-between the to the left and the + /// The 'u' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the u key. + /// representing the u key. public KeyControl uKey => this[Key.U]; /// - /// The 'v' key. The key in-between the to the left and the + /// The 'v' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// representing the v key. + /// representing the v key. public KeyControl vKey => this[Key.V]; /// - /// The 'w' key. The key in-between the to the left and the + /// The 'w' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the w key. + /// representing the w key. public KeyControl wKey => this[Key.W]; /// - /// The 'x' key. The key in-between the to the left and the + /// The 'x' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// representing the x key. + /// representing the x key. public KeyControl xKey => this[Key.X]; /// - /// The 'y' key. The key in-between the to the left and the + /// The 'y' key. The key in-between the to the left and the /// to the right in the top row of alphabetic characters. /// - /// representing the y key. + /// representing the y key. public KeyControl yKey => this[Key.Y]; /// - /// The 'z' key. The key in-between the to the left and the + /// The 'z' key. The key in-between the to the left and the /// to the right in the bottom row of alphabetic characters. /// - /// representing the z key. + /// representing the z key. public KeyControl zKey => this[Key.Z]; /// - /// The '1' key. The key in-between the to the left and the + /// The '1' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 1 key. + /// representing the 1 key. public KeyControl digit1Key => this[Key.Digit1]; /// - /// The '2' key. The key in-between the to the left and the + /// The '2' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 2 key. + /// representing the 2 key. public KeyControl digit2Key => this[Key.Digit2]; /// - /// The '3' key. The key in-between the to the left and the + /// The '3' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 3 key. + /// representing the 3 key. public KeyControl digit3Key => this[Key.Digit3]; /// - /// The '4' key. The key in-between the to the left and the + /// The '4' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 4 key. + /// representing the 4 key. public KeyControl digit4Key => this[Key.Digit4]; /// - /// The '5' key. The key in-between the to the left and the + /// The '5' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 5 key. + /// representing the 5 key. public KeyControl digit5Key => this[Key.Digit5]; /// - /// The '6' key. The key in-between the to the left and the + /// The '6' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 6 key. + /// representing the 6 key. public KeyControl digit6Key => this[Key.Digit6]; /// - /// The '7' key. The key in-between the to the left and the + /// The '7' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 7 key. + /// representing the 7 key. public KeyControl digit7Key => this[Key.Digit7]; /// - /// The '8' key. The key in-between the to the left and the + /// The '8' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 8 key. + /// representing the 8 key. public KeyControl digit8Key => this[Key.Digit8]; /// - /// The '9' key. The key in-between the to the left and the + /// The '9' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 9 key. + /// representing the 9 key. public KeyControl digit9Key => this[Key.Digit9]; /// - /// The '0' key. The key in-between the to the left and the + /// The '0' key. The key in-between the to the left and the /// to the right in the row of digit characters. /// - /// representing the 0 key. + /// representing the 0 key. public KeyControl digit0Key => this[Key.Digit0]; /// /// The shift key on the left side of the keyboard. /// - /// representing the left shift key. + /// representing the left shift key. public KeyControl leftShiftKey => this[Key.LeftShift]; /// /// The shift key on the right side of the keyboard. /// - /// representing the right shift key. + /// representing the right shift key. public KeyControl rightShiftKey => this[Key.RightShift]; /// /// The alt/option key on the left side of the keyboard. /// - /// representing the left alt/option key. + /// representing the left alt/option key. public KeyControl leftAltKey => this[Key.LeftAlt]; /// /// The alt/option key on the right side of the keyboard. /// - /// representing the right alt/option key. + /// representing the right alt/option key. public KeyControl rightAltKey => this[Key.RightAlt]; /// /// The control/ctrl key on the left side of the keyboard. /// - /// representing the left control key. + /// representing the left control key. public KeyControl leftCtrlKey => this[Key.LeftCtrl]; /// @@ -1531,7 +1531,7 @@ public string keyboardLayout /// /// /// This key is usually not present on Mac laptops. - /// representing the right control key. + /// representing the right control key. /// public KeyControl rightCtrlKey => this[Key.RightCtrl]; @@ -1539,168 +1539,168 @@ public string keyboardLayout /// The system "meta" key (Windows key on PC, Apple/command key on Mac) on the left /// side of the keyboard. /// - /// representing the left system meta key. + /// representing the left system meta key. public KeyControl leftMetaKey => this[Key.LeftMeta]; /// /// The system "meta" key (Windows key on PC, Apple/command key on Mac) on the right /// side of the keyboard. /// - /// representing the right system meta key. + /// representing the right system meta key. public KeyControl rightMetaKey => this[Key.RightMeta]; /// - /// Same as . Windows system key on left side of keyboard. + /// Same as . Windows system key on left side of keyboard. /// - /// representing the left Windows system key. + /// representing the left Windows system key. public KeyControl leftWindowsKey => this[Key.LeftWindows]; /// - /// Same as . Windows system key on right side of keyboard. + /// Same as . Windows system key on right side of keyboard. /// - /// representing the right Windows system key. + /// representing the right Windows system key. public KeyControl rightWindowsKey => this[Key.RightWindows]; /// - /// Same as . Apple/command system key on left side of keyboard. + /// Same as . Apple/command system key on left side of keyboard. /// - /// representing the left Apple/command system key. + /// representing the left Apple/command system key. public KeyControl leftAppleKey => this[Key.LeftApple]; /// - /// Same as . Apple/command system key on right side of keyboard. + /// Same as . Apple/command system key on right side of keyboard. /// - /// representing the right Apple/command system key. + /// representing the right Apple/command system key. public KeyControl rightAppleKey => this[Key.RightApple]; /// - /// Same as . Apple/command system key on left side of keyboard. + /// Same as . Apple/command system key on left side of keyboard. /// - /// representing the left Apple/command system key. + /// representing the left Apple/command system key. public KeyControl leftCommandKey => this[Key.LeftCommand]; /// - /// Same as . Apple/command system key on right side of keyboard. + /// Same as . Apple/command system key on right side of keyboard. /// - /// representing the right Apple/command system key. + /// representing the right Apple/command system key. public KeyControl rightCommandKey => this[Key.RightCommand]; /// /// The context menu key. This key is generally only found on PC keyboards. - /// If present, it is located in-between the and the - /// . It brings up the context menu according to the current selection. + /// If present, it is located in-between the and the + /// . It brings up the context menu according to the current selection. /// - /// representing the context menu key. + /// representing the context menu key. public KeyControl contextMenuKey => this[Key.ContextMenu]; /// /// The escape key, i.e. the key generally in the top left corner of the keyboard. - /// Usually to the left of . + /// Usually to the left of . /// - /// representing the escape key. + /// representing the escape key. public KeyControl escapeKey => this[Key.Escape]; /// /// The left arrow key. Usually in a block by itself and generally to the left - /// of . + /// of . /// - /// representing the left arrow key. + /// representing the left arrow key. public KeyControl leftArrowKey => this[Key.LeftArrow]; /// /// The right arrow key. Usually in a block by itself and generally to the right - /// of + /// of /// - /// representing the right arrow key. + /// representing the right arrow key. public KeyControl rightArrowKey => this[Key.RightArrow]; /// /// The up arrow key. Usually in a block by itself and generally on top of the - /// . + /// . /// - /// representing the up arrow key. + /// representing the up arrow key. public KeyControl upArrowKey => this[Key.UpArrow]; /// /// The down arrow key. Usually in a block by itself and generally below the - /// and in-between to the - /// left and to the right. + /// and in-between to the + /// left and to the right. /// - /// representing the down arrow key. + /// representing the down arrow key. public KeyControl downArrowKey => this[Key.DownArrow]; /// /// The backspace key (usually labeled "delete" on Mac). The rightmost key - /// in the top digit row with to the left. + /// in the top digit row with to the left. /// /// - /// representing the backspace key. + /// representing the backspace key. /// /// On the Mac, this key may be labeled "delete" which however is a - /// key different from . + /// key different from . /// public KeyControl backspaceKey => this[Key.Backspace]; /// - /// The page down key. Usually in a separate block with - /// to the left and above it. + /// The page down key. Usually in a separate block with + /// to the left and above it. /// - /// representing the page down key. + /// representing the page down key. public KeyControl pageDownKey => this[Key.PageDown]; /// - /// The page up key. Usually in a separate block with - /// to the left and below it. + /// The page up key. Usually in a separate block with + /// to the left and below it. /// - /// representing the page up key. + /// representing the page up key. public KeyControl pageUpKey => this[Key.PageUp]; /// - /// The 'home' key. Usually in a separate block with - /// to the right and to the left. + /// The 'home' key. Usually in a separate block with + /// to the right and to the left. /// - /// representing the insert key. + /// representing the insert key. public KeyControl homeKey => this[Key.Home]; /// - /// The 'end' key. Usually in a separate block with - /// to the left and to the right. + /// The 'end' key. Usually in a separate block with + /// to the left and to the right. /// - /// representing the end key. + /// representing the end key. public KeyControl endKey => this[Key.End]; /// - /// The 'insert' key. Usually in a separate block with - /// to its right and sitting below it. + /// The 'insert' key. Usually in a separate block with + /// to its right and sitting below it. /// - /// representing the insert key. + /// representing the insert key. public KeyControl insertKey => this[Key.Insert]; /// - /// The 'delete' key. Usually in a separate block with - /// to its right and sitting above it. + /// The 'delete' key. Usually in a separate block with + /// to its right and sitting above it. /// /// - /// representing the delete key. + /// representing the delete key. /// - /// On the Mac, the is also labeled "delete". + /// On the Mac, the is also labeled "delete". /// However, this is not this key. /// public KeyControl deleteKey => this[Key.Delete]; /// - /// The Caps Lock key. The key below and above - /// . + /// The Caps Lock key. The key below and above + /// . /// - /// representing the caps lock key. + /// representing the caps lock key. public KeyControl capsLockKey => this[Key.CapsLock]; /// - /// The Scroll Lock key. The key in-between the - /// to the left and the to the right. May also + /// The Scroll Lock key. The key in-between the + /// to the left and the to the right. May also /// be labeled "F14". /// - /// representing the scroll lock key. + /// representing the scroll lock key. public KeyControl scrollLockKey => this[Key.ScrollLock]; /// @@ -1708,84 +1708,84 @@ public string keyboardLayout /// numpad and which usually toggles the numpad between generating /// digits and triggering functions like "insert" etc. instead. /// - /// representing the num lock key. + /// representing the num lock key. public KeyControl numLockKey => this[Key.NumLock]; /// - /// The Print Screen key. The key sitting in-between - /// to the left and to the right. May also + /// The Print Screen key. The key sitting in-between + /// to the left and to the right. May also /// be labeled "F13". /// - /// representing the print screen key. + /// representing the print screen key. public KeyControl printScreenKey => this[Key.PrintScreen]; /// - /// The pause/break key. The key sitting to the left of . + /// The pause/break key. The key sitting to the left of . /// May also be labeled "F15". /// - /// representing the pause/break key. + /// representing the pause/break key. public KeyControl pauseKey => this[Key.Pause]; /// /// The enter key on the numpad. The key sitting in the bottom right corner /// of the numpad. /// - /// representing the numpad enter key. + /// representing the numpad enter key. public KeyControl numpadEnterKey => this[Key.NumpadEnter]; /// - /// The divide ('/') key on the numpad. The key in-between - /// to the left and to the right. + /// The divide ('/') key on the numpad. The key in-between + /// to the left and to the right. /// /// - /// representing the numpad divide key. + /// representing the numpad divide key. /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad - /// divide key usually is the on PC keyboards. + /// divide key usually is the on PC keyboards. /// public KeyControl numpadDivideKey => this[Key.NumpadDivide]; /// /// The multiply ('*') key on the numpad. The key in the upper right corner of the numpad - /// with to the left and + /// with to the left and /// below it. /// /// - /// representing the numpad multiply key. + /// representing the numpad multiply key. /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad - /// multiply key usually is the on PC keyboards. + /// multiply key usually is the on PC keyboards. /// public KeyControl numpadMultiplyKey => this[Key.NumpadMultiply]; /// /// The minus ('-') key on the numpad. The key on the right side of the numpad with - /// above it and below it. + /// above it and below it. /// /// - /// representing the numpad minus key. + /// representing the numpad minus key. /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. The numpad /// minus key is usually not present on PC keyboards. Instead, the 17-key layout - /// has an elongated that covers the space of two keys. + /// has an elongated that covers the space of two keys. /// public KeyControl numpadMinusKey => this[Key.NumpadMinus]; /// /// The plus ('+') key on the numpad. The key on the right side of the numpad with - /// above it and below it. + /// above it and below it. /// /// - /// representing the numpad plus key. + /// representing the numpad plus key. /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. /// /// In particular, the plus key on the numpad is usually an elongated key that covers - /// the space of two keys. These 17-key numpads do not usually have a + /// the space of two keys. These 17-key numpads do not usually have a /// and the key above the plus key will usually be the numpad minus key. /// /// However, both on a 17-key and 18-key numpad, the plus key references the same physical key. @@ -1793,22 +1793,22 @@ public string keyboardLayout public KeyControl numpadPlusKey => this[Key.NumpadPlus]; /// - /// The period ('.') key on the numpad. The key in-between the - /// to the right and the to the left. + /// The period ('.') key on the numpad. The key in-between the + /// to the right and the to the left. /// /// - /// representing the numpad period key. + /// representing the numpad period key. /// /// This key is the same in 17-key and 18-key numpad layouts. /// public KeyControl numpadPeriodKey => this[Key.NumpadPeriod]; /// - /// The equals ('=') key on the numpad. The key in-between to the left - /// and to the right in the top row of the numpad. + /// The equals ('=') key on the numpad. The key in-between to the left + /// and to the right in the top row of the numpad. /// /// - /// representing the numpad equals key. + /// representing the numpad equals key. /// /// PC keyboards usually have a 17-key numpad layout that differs from the 18-key layout /// we use for reference. The 18-key layout is usually found on Mac keyboards. @@ -1822,166 +1822,166 @@ public string keyboardLayout /// The 0 key on the numpad. The key in the bottom left corner of the numpad. Usually /// and elongated key. /// - /// representing the numpad 0 key. + /// representing the numpad 0 key. public KeyControl numpad0Key => this[Key.Numpad0]; /// - /// The 1 key on the numpad. The key on the left side of the numpad with - /// below it and above it. + /// The 1 key on the numpad. The key on the left side of the numpad with + /// below it and above it. /// - /// representing the numpad 1 key. + /// representing the numpad 1 key. public KeyControl numpad1Key => this[Key.Numpad1]; /// - /// The 2 key on the numpad. The key with the to its left and - /// the to its right. + /// The 2 key on the numpad. The key with the to its left and + /// the to its right. /// - /// representing the numpad 2 key. + /// representing the numpad 2 key. public KeyControl numpad2Key => this[Key.Numpad2]; /// - /// The 3 key on the numpad. The key with the to its left and - /// the to its right. + /// The 3 key on the numpad. The key with the to its left and + /// the to its right. /// - /// representing the numpad 3 key. + /// representing the numpad 3 key. public KeyControl numpad3Key => this[Key.Numpad3]; /// - /// The 4 key on the numpad. The key on the left side of the numpad with the - /// below it and the above it. + /// The 4 key on the numpad. The key on the left side of the numpad with the + /// below it and the above it. /// - /// representing the numpad 4 key. + /// representing the numpad 4 key. public KeyControl numpad4Key => this[Key.Numpad4]; /// - /// The 5 key on the numpad. The key in-between the to the left and the - /// to the right. + /// The 5 key on the numpad. The key in-between the to the left and the + /// to the right. /// - /// representing the numpad 5 key. + /// representing the numpad 5 key. public KeyControl numpad5Key => this[Key.Numpad5]; /// - /// The 6 key on the numpad. The key in-between the to the let and - /// the to the right. + /// The 6 key on the numpad. The key in-between the to the let and + /// the to the right. /// - /// representing the numpad 6 key. + /// representing the numpad 6 key. public KeyControl numpad6Key => this[Key.Numpad6]; /// - /// The 7 key on the numpad. The key on the left side of the numpad with - /// below it and above it. + /// The 7 key on the numpad. The key on the left side of the numpad with + /// below it and above it. /// - /// representing the numpad 7 key. + /// representing the numpad 7 key. public KeyControl numpad7Key => this[Key.Numpad7]; /// - /// The 8 key on the numpad. The key in-between the to the left and the - /// to the right. + /// The 8 key on the numpad. The key in-between the to the left and the + /// to the right. /// - /// representing the numpad 8 key. + /// representing the numpad 8 key. public KeyControl numpad8Key => this[Key.Numpad8]; /// - /// The 9 key on the numpad. The key in-between the to the left and - /// the to the right (or, on 17-key PC keyboard numpads, the elongated + /// The 9 key on the numpad. The key in-between the to the left and + /// the to the right (or, on 17-key PC keyboard numpads, the elongated /// plus key). /// - /// representing the numpad 9 key. + /// representing the numpad 9 key. public KeyControl numpad9Key => this[Key.Numpad9]; /// - /// The F1 key. The key in-between to the left and + /// The F1 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F1 key. + /// representing the F1 key. public KeyControl f1Key => this[Key.F1]; /// - /// The F2 key. The key in-between to the left and + /// The F2 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F2 key. + /// representing the F2 key. public KeyControl f2Key => this[Key.F2]; /// - /// The F3 key. The key in-between to the left and + /// The F3 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F3 key. + /// representing the F3 key. public KeyControl f3Key => this[Key.F3]; /// - /// The F4 key. The key in-between to the left and + /// The F4 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F4 key. + /// representing the F4 key. public KeyControl f4Key => this[Key.F4]; /// - /// The F5 key. The key in-between to the left and + /// The F5 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F5 key. + /// representing the F5 key. public KeyControl f5Key => this[Key.F5]; /// - /// The F6 key. The key in-between to the left and + /// The F6 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F6 key. + /// representing the F6 key. public KeyControl f6Key => this[Key.F6]; /// - /// The F7 key. The key in-between to the left and + /// The F7 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F7 key. + /// representing the F7 key. public KeyControl f7Key => this[Key.F7]; /// - /// The F8 key. The key in-between to the left and + /// The F8 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F8 key. + /// representing the F8 key. public KeyControl f8Key => this[Key.F8]; /// - /// The F9 key. The key in-between to the left and + /// The F9 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F9 key. + /// representing the F9 key. public KeyControl f9Key => this[Key.F9]; /// - /// The F10 key. The key in-between to the left and + /// The F10 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F10 key. + /// representing the F10 key. public KeyControl f10Key => this[Key.F10]; /// - /// The F11 key. The key in-between to the left and + /// The F11 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F11 key. + /// representing the F11 key. public KeyControl f11Key => this[Key.F11]; /// - /// The F12 key. The key in-between to the left and + /// The F12 key. The key in-between to the left and /// to the right in the topmost row of keys. /// - /// representing the F12 key. + /// representing the F12 key. public KeyControl f12Key => this[Key.F12]; /// /// First additional key on the keyboard. /// /// - /// representing . + /// representing . /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -1993,11 +1993,11 @@ public string keyboardLayout /// Second additional key on the keyboard. /// /// - /// representing . + /// representing . /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -2009,11 +2009,11 @@ public string keyboardLayout /// Third additional key on the keyboard. /// /// - /// representing . + /// representing . /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -2025,11 +2025,11 @@ public string keyboardLayout /// Fourth additional key on the keyboard. /// /// - /// representing . + /// representing . /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -2041,11 +2041,11 @@ public string keyboardLayout /// Fifth additional key on the keyboard. /// /// - /// representing . + /// representing . /// /// Keyboards may have additional keys that are not part of the standardized 104-key keyboard layout /// (105 in the case of an 18-key numpad). For example, many non-English keyboard layouts have an additional - /// key in-between and . + /// key in-between and . /// /// Additional keys may be surfaced by the platform as "OEM" keys. There is no guarantee about where the /// keys are located and what symbols they produce. The OEM key controls are mainly there to surface the @@ -2054,46 +2054,46 @@ public string keyboardLayout public KeyControl oem5Key => this[Key.OEM5]; /// - /// An artificial combination of and into one control. + /// An artificial combination of and into one control. /// /// - /// representing a combined left and right shift key. + /// representing a combined left and right shift key. /// - /// This is a button which is considered pressed whenever the left and/or + /// This is a button which is considered pressed whenever the left and/or /// right shift key is pressed. /// public ButtonControl shiftKey { get; protected set; } /// - /// An artificial combination of and into one control. + /// An artificial combination of and into one control. /// /// - /// representing a combined left and right ctrl key. + /// representing a combined left and right ctrl key. /// - /// This is a button which is considered pressed whenever the left and/or + /// This is a button which is considered pressed whenever the left and/or /// right ctrl key is pressed. /// public ButtonControl ctrlKey { get; protected set; } /// - /// An artificial combination of and into one control. + /// An artificial combination of and into one control. /// /// - /// representing a combined left and right alt key. + /// representing a combined left and right alt key. /// - /// This is a button which is considered pressed whenever the left and/or + /// This is a button which is considered pressed whenever the left and/or /// right alt key is pressed. /// public ButtonControl altKey { get; protected set; } /// - /// True when IME composition is enabled. Requires to be called to enable IME, and the user to enable it at the OS level. + /// True when IME composition is enabled. Requires to be called to enable IME, and the user to enable it at the OS level. /// /// /// Some languages use complex input methods which involve opening windows to insert characters. /// Typically, this is not desirable while playing a game, as games may just interpret keystrokes as game input, not as text. /// - /// See for turning IME on/off + /// See for turning IME on/off /// public ButtonControl imeSelected { get; protected set; } @@ -2130,7 +2130,7 @@ public KeyControl this[Key key] /// /// A keyboard will automatically be made current when receiving input or when /// added to the input system. - /// The currently active keyboard is tracked in . + /// The currently active keyboard is tracked in . /// /// /// @@ -2336,8 +2336,8 @@ protected override void RefreshConfiguration() /// /// A type value that represents the character that has been entered. /// - /// The system will call this method automatically whenever a is - /// received that targets the keyboard device. Subscribe to this event by using . + /// The system will call this method automatically whenever a is + /// received that targets the keyboard device. Subscribe to this event by using . /// /// /// @@ -2361,7 +2361,7 @@ public void OnTextInput(char character) } /// - /// Return the key control that, according to the currently active keyboard layout (see ), + /// Return the key control that, according to the currently active keyboard layout (see ), /// is associated with the given text. /// /// Display name reported for the key according to the currently active keyboard layout. @@ -2387,7 +2387,7 @@ public void OnTextInput(char character) /// } /// /// - /// + /// public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) { var keys = allKeys; @@ -2400,9 +2400,9 @@ public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) /// /// This is called to set the IME composition strings. Fired once for every change containing the entire string to date. /// - /// The for the IME composition. + /// The for the IME composition. /// - /// To call back to the changed composition string, subscribe to the event. + /// To call back to the changed composition string, subscribe to the event. /// /// /// @@ -2422,8 +2422,8 @@ public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) /// } /// /// - /// - /// + /// + /// public void OnIMECompositionChanged(IMECompositionString compositionString) { if (m_ImeCompositionListeners.length > 0) From 229b655eddb5bb8c92647582e2ce6b9d1047fc0e Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 16:58:49 +0100 Subject: [PATCH 13/24] doc fixes --- .../InputSystem/Devices/Keyboard.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 90692e034f..e017ad3751 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -17,7 +17,7 @@ namespace UnityEngine.InputSystem.LowLevel /// /// /// Can be used to update the state of devices. - /// + /// /// /// /// using UnityEngine; @@ -35,7 +35,6 @@ namespace UnityEngine.InputSystem.LowLevel /// } /// /// - /// /// // NOTE: This layout has to match the KeyboardInputState layout used in native! [StructLayout(LayoutKind.Sequential)] @@ -919,7 +918,7 @@ public enum Key /// } /// /// - /// + /// [InputControlLayout(stateType = typeof(KeyboardState), isGenericTypeOfDevice = true)] public class Keyboard : InputDevice, ITextInputReceiver { @@ -1063,7 +1062,7 @@ public event Action onIMECompositionChange /// for more IME settings and data. /// /// - /// The IME composition enabled state. to enable the IME, to disable it. + /// The IME composition enabled state. to enable the IME, to disable it. /// /// /// @@ -2387,7 +2386,7 @@ public void OnTextInput(char character) /// } /// /// - /// + /// public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) { var keys = allKeys; @@ -2422,8 +2421,8 @@ public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) /// } /// /// - /// - /// + /// + /// public void OnIMECompositionChanged(IMECompositionString compositionString) { if (m_ImeCompositionListeners.length > 0) From 99ca583c18d50d4643952a76815270c23940b239 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 17:23:07 +0100 Subject: [PATCH 14/24] remove code out of remarks section --- Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index e017ad3751..193f7b7ca6 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -228,7 +228,7 @@ namespace UnityEngine.InputSystem /// /// To find the text character (if any) generated by a key according to the currently active keyboard /// layout, use the property of . - /// + /// /// /// /// using UnityEngine; @@ -247,7 +247,6 @@ namespace UnityEngine.InputSystem /// } /// /// - /// // NOTE: Has to match up with 'KeyboardInputState::KeyCode' in native. // NOTE: In the keyboard code, we depend on the order of the keys in the various keyboard blocks. public enum Key From e2d5fd2d3327f51ff4513e734f2206704a971850 Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Thu, 5 Dec 2024 18:12:22 +0100 Subject: [PATCH 15/24] fixes for docs --- .../InputSystem/Controls/InputControl.cs | 22 +++----- .../InputSystem/Devices/InputDevice.cs | 50 +++++++++---------- 2 files changed, 31 insertions(+), 41 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs index 0df10cf1b8..d6515737a3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs @@ -77,7 +77,7 @@ namespace UnityEngine.InputSystem /// which has APIs specific to the type of value of the control (e.g. . /// /// The following example demonstrates various common operations performed on input controls: - /// + /// /// /// /// // Look up dpad/up control on current gamepad. @@ -99,10 +99,7 @@ namespace UnityEngine.InputSystem /// leftStickHistory.Enable(); /// /// - /// - /// - /// - /// + /// /// /// /// @@ -611,6 +608,8 @@ public virtual unsafe void WriteValueFromObjectIntoState(object value, void* sta /// Note that if the given path matches multiple child controls, only the first control /// encountered in the search will be returned. /// + /// This method is equivalent to calling . + /// /// /// /// // Returns the leftStick control of the current gamepad. @@ -625,9 +624,6 @@ public virtual unsafe void WriteValueFromObjectIntoState(object value, void* sta /// Gamepad.current.TryGetChildControl("*stick"); /// /// - /// - /// This method is equivalent to calling . - /// public InputControl TryGetChildControl(string path) { if (string.IsNullOrEmpty(path)) @@ -689,7 +685,7 @@ protected InputControl() /// /// This method can be overridden to perform control- or device-specific setup work. The most /// common use case is for looking up child controls and storing them in local getters. - /// + /// /// /// /// public class MyDevice : InputDevice @@ -706,7 +702,6 @@ protected InputControl() /// } /// /// - /// protected virtual void FinishSetup() { } @@ -723,7 +718,7 @@ protected virtual void FinishSetup() /// /// This method should be called if you are accessing cached data set up by /// . - /// + /// /// /// /// using UnityEngine.InputSystem; @@ -782,7 +777,6 @@ protected virtual void FinishSetup() /// } /// /// - /// /// protected void RefreshConfigurationIfNeeded() { @@ -798,7 +792,7 @@ protected void RefreshConfigurationIfNeeded() /// /// /// The system will call this method automatically whenever change is made to one of the control's configuration properties. - /// See . + /// See . /// /// /// @@ -960,8 +954,6 @@ protected virtual FourCC CalculateOptimizedControlDataType() /// /// Apply built-in parameters changes (e.g. , others), recompute for impacted controls and clear cached value. /// - /// - /// public void ApplyParameterChanges() { // First we go through all children of our own hierarchy diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index 2cf591a6da..394791276e 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -41,19 +41,27 @@ namespace UnityEngine.InputSystem /// runtime. However, it is possible to manually add devices using methods such as . /// - /// - /// - /// // Add a "synthetic" gamepad that isn't actually backed by hardware. - /// var gamepad = InputSystem.AddDevice<Gamepad>(); - /// - /// - /// /// There are subclasses representing the most common types of devices, like , /// , , and . /// /// To create your own types of devices, you can derive from InputDevice and register your device /// as a new "layout". /// + /// Devices can have usages like any other control (). Unlike other controls, + /// however, usages of InputDevices are allowed to be changed on the fly without requiring a change to the + /// device layout (see ). + /// + /// For a more complete example of how to implement custom input devices, check out the "Custom Device" + /// sample which you can install from the Unity package manager. + /// + /// And, as always, you can also find more information in the manual. + /// + /// + /// + /// // Add a "synthetic" gamepad that isn't actually backed by hardware. + /// var gamepad = InputSystem.AddDevice<Gamepad>(); + /// + /// /// /// /// // InputControlLayoutAttribute attribute is only necessary if you want @@ -131,16 +139,6 @@ namespace UnityEngine.InputSystem /// } /// /// - /// - /// Devices can have usages like any other control (). Unlike other controls, - /// however, usages of InputDevices are allowed to be changed on the fly without requiring a change to the - /// device layout (see ). - /// - /// For a more complete example of how to implement custom input devices, check out the "Custom Device" - /// sample which you can install from the Unity package manager. - /// - /// And, as always, you can also find more information in the manual. - /// /// /// /// @@ -508,9 +506,9 @@ public virtual void MakeCurrent() /// /// /// This is called after the device has already been added. - /// - /// - /// + /// + /// + /// /// /// /// @@ -537,9 +535,9 @@ protected virtual void OnAdded() /// /// /// This is called after the device has already been removed. - /// - /// - /// + /// + /// + /// /// /// /// @@ -575,7 +573,7 @@ protected virtual void OnRemoved() /// /// /// - /// /// + /// protected virtual void OnConfigurationChanged() { } @@ -593,8 +591,8 @@ protected virtual void OnConfigurationChanged() /// the device API. This is most useful for devices implemented in the native Unity runtime /// which, through the command interface, may provide custom, device-specific functions. /// - /// This is a low-level API. It works in a similar way to - /// DeviceIoControl on Windows and ioctl + /// This is a low-level API. It works in a similar way to + /// DeviceIoControl on Windows and ioctl /// on UNIX-like systems. /// public unsafe long ExecuteCommand(ref TCommand command) From 0edc347ea2a7114e721bc8dd6ada920942dc80da Mon Sep 17 00:00:00 2001 From: Rita Merkl Date: Fri, 6 Dec 2024 11:19:47 +0100 Subject: [PATCH 16/24] fix CI failures --- .../InputSystem/Devices/InputDevice.cs | 24 ++++++++++++------- .../InputSystem/Devices/Keyboard.cs | 4 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index 394791276e..137a756d1a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -58,12 +58,15 @@ namespace UnityEngine.InputSystem /// /// /// - /// // Add a "synthetic" gamepad that isn't actually backed by hardware. - /// var gamepad = InputSystem.AddDevice<Gamepad>(); - /// - /// - /// - /// + /// using System.Runtime.InteropServices; + /// using UnityEditor; + /// using UnityEngine; + /// using UnityEngine.InputSystem; + /// using UnityEngine.InputSystem.Controls; + /// using UnityEngine.InputSystem.Layouts; + /// using UnityEngine.InputSystem.LowLevel; + /// using UnityEngine.InputSystem.Utilities; + /// /// // InputControlLayoutAttribute attribute is only necessary if you want /// // to override default behavior that occurs when registering your device /// // as a layout. @@ -78,6 +81,9 @@ namespace UnityEngine.InputSystem /// public ButtonControl button { get; private set; } /// public AxisControl axis { get; private set; } /// + /// // This is an example on how to add a "synthetic" gamepad that isn't actually backed by hardware. + /// Gamepad gamepad = InputSystem.AddDevice<Gamepad>(); + /// /// // Register the device. /// static MyDevice() /// { @@ -121,7 +127,7 @@ namespace UnityEngine.InputSystem /// // particular device is connected and fed into the input system. /// // The format is a simple FourCC code that "tags" state memory blocks for the /// // device to give a base level of safety checks on memory operations. - /// public FourCC format => return new FourCC('H', 'I', 'D'); + /// public FourCC format => new FourCC('H', 'I', 'D'); /// /// // InputControlAttributes on fields tell the input system to create controls /// // for the public fields found in the struct. @@ -129,12 +135,12 @@ namespace UnityEngine.InputSystem /// // Assume a 16bit field of buttons. Create one button that is tied to /// // bit #3 (zero-based). Note that buttons do not need to be stored as bits. /// // They can also be stored as floats or shorts, for example. - /// [InputControl(name = "button", layout = "Button", bit = 3)] + /// [InputControl(name = "button", layout = "Button", bit = 3)] [FieldOffset(0)] /// public ushort buttons; /// /// // Create a floating-point axis. The name, if not supplied, is taken from /// // the field. - /// [InputControl(layout = "Axis")] + /// [InputControl(layout = "Axis")] [FieldOffset(0)] /// public short axis; /// } /// diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 193f7b7ca6..9fa7cf0079 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -35,7 +35,7 @@ namespace UnityEngine.InputSystem.LowLevel /// } /// /// - /// + /// // NOTE: This layout has to match the KeyboardInputState layout used in native! [StructLayout(LayoutKind.Sequential)] public unsafe struct KeyboardState : IInputStateTypeInfo @@ -43,7 +43,7 @@ public unsafe struct KeyboardState : IInputStateTypeInfo /// /// Memory format tag for KeyboardState. Returns "KEYS". /// - /// + /// public static FourCC Format => new FourCC('K', 'E', 'Y', 'S'); private const int kSizeInBits = Keyboard.KeyCount; From 51c986533feadae4ac1919a6654db65f9262cfbc Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:04:57 +0100 Subject: [PATCH 17/24] small text fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Freire --- .../com.unity.inputsystem/InputSystem/Devices/InputDevice.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index 137a756d1a..a8f7c5a9b5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -54,7 +54,7 @@ namespace UnityEngine.InputSystem /// For a more complete example of how to implement custom input devices, check out the "Custom Device" /// sample which you can install from the Unity package manager. /// - /// And, as always, you can also find more information in the manual. + /// You can also find more information in the manual. /// /// /// From 69612a33d3a3f1232291207083c38faf98e2b8cc Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:05:32 +0100 Subject: [PATCH 18/24] phrasing fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Freire --- Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index 9fa7cf0079..d86e371d57 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -2342,7 +2342,7 @@ protected override void RefreshConfiguration() /// using UnityEngine; /// using UnityEngine.InputSystem; /// - /// public class UserTest : MonoBehaviour + /// public class OnTextInputExample : MonoBehaviour /// { /// // Simulate text input event on the current keyboard. /// private void FakeInput() From f6755a4e44a4c32a6bb542d69efd9024992a2441 Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:06:07 +0100 Subject: [PATCH 19/24] Small phrasing fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Freire --- Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index d86e371d57..abd7490909 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -2396,7 +2396,7 @@ public KeyControl FindKeyOnCurrentKeyboardLayout(string displayName) } /// - /// This is called to set the IME composition strings. Fired once for every change containing the entire string to date. + /// This is called to set the IME composition strings. Fired once for every change containing the entire string. /// /// The for the IME composition. /// From e107217c2a9e12265078cd54c90641207dcfc4cf Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:07:00 +0100 Subject: [PATCH 20/24] small addition on text for tab key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Freire --- Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index abd7490909..a7303f5927 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -1169,7 +1169,7 @@ public string keyboardLayout public KeyControl enterKey => this[Key.Enter]; /// - /// The tab key, located on the left side above the . + /// The tab key, which is generally located on the left side above the . /// /// representing the tab key. public KeyControl tabKey => this[Key.Tab]; From 9ea96b96de63089733bcd542df9a6b8ea47cf0c0 Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:07:33 +0100 Subject: [PATCH 21/24] Formatting of text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Freire --- .../com.unity.inputsystem/InputSystem/Devices/InputDevice.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index a8f7c5a9b5..ae1775cd6c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -47,8 +47,7 @@ namespace UnityEngine.InputSystem /// To create your own types of devices, you can derive from InputDevice and register your device /// as a new "layout". /// - /// Devices can have usages like any other control (). Unlike other controls, - /// however, usages of InputDevices are allowed to be changed on the fly without requiring a change to the + /// Devices can have usages like any other control (). However, usages of InputDevices are allowed to be changed on the fly without requiring a change to the /// device layout (see ). /// /// For a more complete example of how to implement custom input devices, check out the "Custom Device" From 62ca3ba49f2c822498f8c1180766bbf5d4dc9789 Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:20:35 +0100 Subject: [PATCH 22/24] Input Control update text Co-authored-by: Ben Pitt --- .../com.unity.inputsystem/InputSystem/Controls/InputControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs index d6515737a3..5cfa3b49b8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs @@ -791,7 +791,7 @@ protected void RefreshConfigurationIfNeeded() /// Refresh the configuration of the control. This is used to update the control's state (e.g. Keyboard Layout or display Name of Keys). /// /// - /// The system will call this method automatically whenever change is made to one of the control's configuration properties. + /// The system will call this method automatically whenever a change is made to one of the control's configuration properties. /// See . /// /// From a2619bcff5b71d635511b5f0ece7859b38e8785b Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:20:48 +0100 Subject: [PATCH 23/24] Input Device update text Co-authored-by: Ben Pitt --- .../com.unity.inputsystem/InputSystem/Devices/InputDevice.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index ae1775cd6c..49c78673c4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -80,7 +80,7 @@ namespace UnityEngine.InputSystem /// public ButtonControl button { get; private set; } /// public AxisControl axis { get; private set; } /// - /// // This is an example on how to add a "synthetic" gamepad that isn't actually backed by hardware. + /// // This is an example of how to add a "synthetic" gamepad that isn't actually backed by hardware. /// Gamepad gamepad = InputSystem.AddDevice<Gamepad>(); /// /// // Register the device. From 6342ca853cb283c58e83e467cb24a540d78e2186 Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:21:09 +0100 Subject: [PATCH 24/24] Update text for IME composition event Co-authored-by: Ben Pitt --- Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index a7303f5927..319e3cc4c0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -1002,7 +1002,7 @@ public event Action onTextInput } /// - /// An event that is fired to get IME composition strings. Fired once for every change containing the entire string to date. + /// When a user is entering text using IME composition, this event occurs each time the IME composition string changes, and provides the new composition string as a value. /// When using an IME, this event can be used to display the composition string while it is being edited. /// ///