Skip to content

Update InputSettings.cs#2359

Open
suearkinunity wants to merge 3 commits intodevelopfrom
suearkinunity-docatt-10243
Open

Update InputSettings.cs#2359
suearkinunity wants to merge 3 commits intodevelopfrom
suearkinunity-docatt-10243

Conversation

@suearkinunity
Copy link
Collaborator

@suearkinunity suearkinunity commented Feb 25, 2026

Description

From DOCATT-10243: information about BackgroundBehavior.IgnoreFocus

Testing status & QA

Docs only

Overall Product Risks

None

Comments to reviewers

Docs only

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.

Updating ignorefocus
@cla-assistant-unity
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Adding a remark about limitations
@suearkinunity suearkinunity marked this pull request as ready for review February 25, 2026 10:55
@u-pr
Copy link
Contributor

u-pr bot commented Feb 25, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

DOCATT-10243 - Fully compliant

Compliant requirements:

  • Clarify IgnoreFocus behavior explicitly stating that it does not disable devices when focus is lost, nor does it reset/sync device states on focus changes.
  • Explain that controls may retain a stale state (e.g. key released while unfocused will still be reported as pressed when focus returns) and that this is expected behavior.
  • Recommend using ResetAndDisableNonBackgroundDevices or ResetAndDisableAllDevices if a reliable state is needed.
  • Add a section on background input limitations noting that receiving input while unfocused is platform and device-dependent.
  • Detail specific limitations for Keyboard, Mouse, and XR HMDs.
  • Clarify that IgnoreFocus does not grant background input ability; it only prevents reset/disable on focus changes.
 Estimated effort to review: 1 🔵⚪⚪⚪⚪

This is a very short documentation-only PR that updates XML comments for an enum, requiring minimal review effort.

🏅 Score: 85

The PR successfully addresses all the Jira ticket requirements with clear and accurate documentation, but introduces a couple of minor formatting mistakes.

🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Code Formatting

The closing brace } for the BackgroundBehavior enum was moved to the same line as the IgnoreFocus value. It should be placed on a new line to maintain standard C# code formatting.

/// </summary>
IgnoreFocus = 2,}
Typo in XML Doc

There is an extra slash (////) used in the XML documentation comments, creating a malformed empty line. It should be changed to the standard three slashes (///).

/// Limitations:
////
/// Receiving input while the application is not in the foreground is platform and device-dependent, and should not be relied upon. 
  • Update review

🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr

@u-pr
Copy link
Contributor

u-pr bot commented Feb 25, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

@codecov-github-com
Copy link

codecov-github-com bot commented Feb 25, 2026

Codecov Report

All modified and coverable lines are covered by tests ✅

@@             Coverage Diff             @@
##           develop    #2359      +/-   ##
===========================================
- Coverage    77.90%   77.89%   -0.02%     
===========================================
  Files          476      476              
  Lines        97613    97611       -2     
===========================================
- Hits         76048    76035      -13     
- Misses       21565    21576      +11     
Flag Coverage Δ
inputsystem_MacOS_2022.3_project 75.39% <ø> (ø)
inputsystem_MacOS_6000.0_project 77.29% <ø> (ø)
inputsystem_MacOS_6000.3_project 77.29% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.4_project 77.31% <ø> (+<0.01%) ⬆️
inputsystem_MacOS_6000.5_project 77.29% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.6_project 77.29% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_2022.3_project 75.19% <ø> (ø)
inputsystem_Ubuntu_6000.0_project 77.09% <ø> (ø)
inputsystem_Ubuntu_6000.3_project 77.09% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.4_project 77.10% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.5_project 77.10% <ø> (-0.02%) ⬇️
inputsystem_Ubuntu_6000.6_project 77.10% <ø> (-0.01%) ⬇️
inputsystem_Windows_2022.3_project 75.52% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.0_project 77.42% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.3_project 77.42% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.4_project 77.42% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.5_project 77.42% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.6_project 77.42% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...com.unity.inputsystem/InputSystem/InputSettings.cs 82.64% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@MorganHoarau MorganHoarau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a great improvement, thank you!

Co-authored-by: Morgan Hoarau <122548697+MorganHoarau@users.noreply.github.com>
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