-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NEW: Added support for F13 to F24 keys #2075
base: develop
Are you sure you want to change the base?
Conversation
.WithLayout(new InternedString("Keyboard")) | ||
.WithStateBlock(new InputStateBlock { format = new FourCC(1262836051), sizeInBits = 112 }); | ||
.WithStateBlock(new InputStateBlock { format = new FourCC(1262836051), sizeInBits = 136 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use this is what we get for FourCC form the generator, just reacted to it but realised its generated :)
[InputControl(name = "f22", displayName = "F22", layout = "Key", bit = (int)Key.F22)] | ||
[InputControl(name = "f23", displayName = "F23", layout = "Key", bit = (int)Key.F23)] | ||
[InputControl(name = "f24", displayName = "F24", layout = "Key", bit = (int)Key.F24)] | ||
[InputControl(name = "IMESelected", layout = "Button", bit = (int)KeyEx.RemapedIMESelected, synthetic = true)] // Use the last bit to hold IME selected state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked that this works for ImeSelected when using an older Unity version?
/// Don't use this. This is a dummy key that is only used internally to represent the IME selected state. | ||
/// Will be removed in the future. | ||
/// </summary> | ||
[Obsolete("Don't use this. This is a dummy key that is only used internally to represent the IME selected state. Will be removed in the future.", true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Older Input Systems would still rely on this bit
keyboardState->Set(KeyEx.RemapedIMESelected, true); | ||
} | ||
|
||
//stateEvent->stateSizeInBytes = KeyboardState.kSizeInBytes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am guessing this would be removed?
@@ -2674,7 +2674,7 @@ public void Devices_AnyKeyOnKeyboard_DoesNotReactToIMESelected() | |||
{ | |||
var keyboard = InputSystem.AddDevice<Keyboard>(); | |||
|
|||
InputSystem.QueueStateEvent(keyboard, new KeyboardState(Key.IMESelected)); | |||
InputSystem.QueueStateEvent(keyboard, new KeyboardState(IMESelected: true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to have a test that has an underlying struct/memory representation that looks like the previous one to prove that its backwards compatible?
Description
Please fill this section with a description what the pull request is trying to address and what changes were made.
Testing status & QA
Please describe the testing already done by you and what testing you request/recommend QA to execute. If you used or created any testing project please link them here too for QA.
Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Comments to reviewers
Please describe any additional information such as what to focus on, or historical info for the reviewers.
Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: