Skip to content
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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bmalrat
Copy link
Collaborator

@bmalrat bmalrat commented Dec 4, 2024

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.

  • Complexity:
  • Halo Effect:

Comments to reviewers

Please describe any additional information such as what to focus on, or historical info for the reviewers.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

.WithLayout(new InternedString("Keyboard"))
.WithStateBlock(new InputStateBlock { format = new FourCC(1262836051), sizeInBits = 112 });
.WithStateBlock(new InputStateBlock { format = new FourCC(1262836051), sizeInBits = 136 });
Copy link
Collaborator

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.
Copy link
Collaborator

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)]
Copy link
Collaborator

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;
Copy link
Collaborator

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));
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants