Skip to content

fix(nsgotest): release physical keys on window blur - #2329

Merged
houko merged 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2248
Nov 25, 2026
Merged

houko merged 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2248

Conversation

@J4ck1e2000

Copy link
Copy Markdown
Contributor

Summary

Headless BlurWindow now releases a key with its original logical name and physical code, so both held-key trackers clear and the focused view receives the expected OnKeyUp. The regression holds a named key and a physical key on a non-US layout at the same time.

Fixes #2248.

Targets

  • Shared code (nsgotest, headless only)

Screenshots

None; headless input simulation only.

Verification

  • go tool nsgo check ./nsgotest
  • go tool nsgo test -run '^Test(BlurWindowReleasesNamedAndPhysicalKeys|KeysGoDownAndComeUpSeparately|PhysicalKeyStepsFollowThePositionAndLayout|KeysDownHearsKeysNoViewHears|MouseDownUpHeldButtonsAndBlurWindow)$' ./nsgotest -- -count=1 (5 passed)

The full repository test suite was not run locally.

Checklist

  • Conventional Commit title.
  • Changelog fragment added. The testing guide already documents that blur clears all held keys.
  • No third-party code, assets, or dependency changes.

🤖 openai-codex/gpt-6.2-sol

Send the held key's original logical name and physical code when the headless test window loses focus so both held-key trackers receive the release.

Fixes nsgo-dev#2248
@github-actions github-actions Bot added size/S bug Something isn't working documentation Improvements or additions to documentation and removed bug Something isn't working size/S labels Nov 24, 2026
@houko houko self-assigned this Nov 25, 2026

@houko houko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed against origin/main and issue #2248.

BlurWindow now dispatches the held key's original logical name and physical code, matching the normal release path. The regression test covers named and physical keys, KeyCodesDown, KeysDown, and OnKeyUp, and the required checks are green. Approving.

@houko
houko merged commit 69b9a67 into nsgo-dev:main Nov 25, 2026
27 checks passed
@J4ck1e2000
J4ck1e2000 deleted the fix/issue-2248 branch November 26, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nsgotest: BlurWindow leaves keys held with KeyCodeDown in KeyCodesDown

2 participants