Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Assets/Samples/InGameHints/InGameHintsActions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.13.1
// version 1.14.0
// from Assets/Samples/InGameHints/InGameHintsActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down
2 changes: 1 addition & 1 deletion Assets/Samples/SimpleDemo/SimpleControls.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.13.1
// version 1.14.0
// from Assets/Samples/SimpleDemo/SimpleControls.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down
2 changes: 2 additions & 0 deletions Assets/Tests/InputSystem/APIVerificationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ public class DualShock4GamepadHID : DualShockGamepad
public int right = 0;
public int up = 0;
")]
// KeyboardState state size has increased to support more keys like F13-F24
[ScopedExclusionProperty("1.0.0", "UnityEngine.InputSystem.LowLevel", "public struct KeyboardState : IInputStateTypeInfo", "public fixed byte keys[14];")]
public void API_MinorVersionsHaveNoBreakingChanges()
{
var currentVersion = CoreTests.PackageJson.ReadVersion();
Expand Down
5 changes: 5 additions & 0 deletions Assets/Tests/InputSystem/CorePerformanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,13 @@ public void Performance_ReadEveryKey()

Measure.Method(() =>
{
int keyIndex = 0;
foreach (var key in keyboard.allKeys)
{
if (++keyIndex == (int)Key.IMESelected) // Skip IMESelected as it's not a real key.
continue;
key.ReadValue();
}
})
.MeasurementCount(100)
.WarmupCount(5)
Expand Down
50 changes: 49 additions & 1 deletion Assets/Tests/InputSystem/CoreTests_Devices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2674,10 +2674,58 @@ public void Devices_AnyKeyOnKeyboard_DoesNotReactToIMESelected()
{
var keyboard = InputSystem.AddDevice<Keyboard>();

InputSystem.QueueStateEvent(keyboard, new KeyboardState(Key.IMESelected));
InputSystem.QueueStateEvent(keyboard, new KeyboardState(IMESelected: true));
InputSystem.Update();

Assert.That(keyboard.anyKey.isPressed, Is.False);
Assert.That(keyboard.imeSelected.isPressed, Is.True);
}

[Test]
[Category("Devices")]
public void Devices_ImeSelectedKeyOnKeyboard_SupportObsoleteIMESelectedKey()
{
var keyboard = InputSystem.AddDevice<Keyboard>();

InputSystem.QueueStateEvent(keyboard, new KeyboardState(Key.IMESelected));
InputSystem.Update();

Assert.That(keyboard.imeSelected.isPressed, Is.True);
}

[Test]
[Category("Devices")]
public void Devices_ImeSelectedKeyOnKeyboard_IsBackwardCompatible()
{
var keyboard = InputSystem.AddDevice<Keyboard>();

var oldKeyboardStateWithIMESelected = new KeyboardState(Key.None);
// Hard coded state from previous version that have IMESelected setted
unsafe
{
oldKeyboardStateWithIMESelected.keys[0] = 0;
oldKeyboardStateWithIMESelected.keys[1] = 0;
oldKeyboardStateWithIMESelected.keys[2] = 0;
oldKeyboardStateWithIMESelected.keys[3] = 0;
oldKeyboardStateWithIMESelected.keys[4] = 0;
oldKeyboardStateWithIMESelected.keys[5] = 0;
oldKeyboardStateWithIMESelected.keys[6] = 0;
oldKeyboardStateWithIMESelected.keys[7] = 0;

oldKeyboardStateWithIMESelected.keys[8] = 0;
oldKeyboardStateWithIMESelected.keys[9] = 0;
oldKeyboardStateWithIMESelected.keys[10] = 0;
oldKeyboardStateWithIMESelected.keys[11] = 0;
oldKeyboardStateWithIMESelected.keys[12] = 0;
oldKeyboardStateWithIMESelected.keys[13] = 128;
oldKeyboardStateWithIMESelected.keys[14] = 0;
oldKeyboardStateWithIMESelected.keys[15] = 0;
}

InputSystem.QueueStateEvent(keyboard, oldKeyboardStateWithIMESelected);
InputSystem.Update();

Assert.That(keyboard.imeSelected.isPressed, Is.True);
}

[Test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.13.1
// version 1.14.0
// from Assets/Tests/InputSystem/InputActionCodeGeneratorActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down
3 changes: 3 additions & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ however, it has to be formatted properly to pass verification tests.
### Changed
- Changed default input action asset name from New Controls to New Actions.

### Added
- Added support of F13-F24 keys. [UUM-44328](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-44328)

## [1.13.0] - 2025-02-05

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Packages/com.unity.inputsystem/InputSystem/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static partial class InputSystem
// Keep this in sync with "Packages/com.unity.inputsystem/package.json".
// NOTE: Unfortunately, System.Version doesn't use semantic versioning so we can't include
// "-preview" suffixes here.
internal const string kAssemblyVersion = "1.13.1";
internal const string kDocUrl = "https://docs.unity3d.com/Packages/com.unity.inputsystem@1.13";
internal const string kAssemblyVersion = "1.14.0";
internal const string kDocUrl = "https://docs.unity3d.com/Packages/com.unity.inputsystem@1.14";
}
}
Loading