Skip to content

feat(core): expose physical keyboard positions - #1301

Merged
houko merged 5 commits into
nsgo-dev:mainfrom
houko:feat/physical-keycodes-1242
Nov 22, 2026
Merged

houko merged 5 commits into
nsgo-dev:mainfrom
houko:feat/physical-keycodes-1242

Conversation

@houko

@houko houko commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #1242.

Summary

  • Carry physical key positions through native and browser events and keep them independently queryable on the window.
  • Resolve key prompts from the active desktop layout or browser layout map, with an observed-key fallback for other targets.
  • Add headless physical key steps and cover different logical names at the same position, event repeat, independent Shift keys, and release on focus loss.

Verification

  • Core and nsgotest keyboard suites, the native AppKit regression, the Chrome regression and three shared Chrome keyboard tests passed.
  • go tool nsgo check -target macos,windows,linux,web,ios,android -jobs 2 passed. Apple build and vet and the Windows test job passed in CI.
  • Rebuilt the Android runtime JAR and DEX with its checked-in build script.
  • The physical AZERTY and QWERTZ acceptance matrix remains open in Keys: report the physical key position beside the layout's key name #1242.

@github-actions github-actions Bot added enhancement New feature or request size/XL documentation Improvements or additions to documentation macOS iOS Windows Linux Web Android core labels Nov 21, 2026
@houko
houko force-pushed the feat/physical-keycodes-1242 branch from ad883a3 to e7e2b57 Compare November 21, 2026 11:15
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/physical-keycodes-1242 branch from e7e2b57 to 56ff4a8 Compare November 21, 2026 11:40
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/physical-keycodes-1242 branch from 56ff4a8 to 9c6feb4 Compare November 21, 2026 21:30
@github-actions github-actions Bot removed the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko

houko commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewed.

  • Rebased onto main and resolved the overlaps with the mouse-button tracking (HeldMouseButtons) on macOS, Windows, Linux and the web, with the gamepad and disk-space messages on Android, and with WM_POWERBROADCAST on Windows. The physical-key Java to Go message now uses 30: 24 is main's GAMEPAD, and 26/29 are claimed by other open branches. TestJavaProtocolMatchesTheDriver, TestJavaReaderTakesWhatGoWrites and TestJavaMessagesMatchTheBackend pass.
  • Restored main's classes.dex/classes.jar; CI builds the runtime from the branch's Java.
  • Checked the scan-code tables against Chromium's DOM code data for the platforms used here, the UCKeyTranslate, ToUnicodeEx and gdk_display_translate_key bindings, the Android down/up/repeat bookkeeping and the focus-loss releases.
  • Put the added comments on single lines and gofmt'd the merged struct fields and constants.
  • vet on Linux, Windows, js/wasm, Android, macOS and iOS; tests in core, nsgotest, internal/driver and the Android protocol tests pass. TestMinimalAppLinks/darwin_arm64 fails because main's own f0fccfb pulls net/http into darwin apps, not because of this branch.
  • The AZERTY/QWERTZ hardware checks in Keys: report the physical key position beside the layout's key name #1242 are still open, as the PR body says.

@houko
houko enabled auto-merge (rebase) November 21, 2026 21:30
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/physical-keycodes-1242 branch from 9c6feb4 to 279ca69 Compare November 21, 2026 22:19
@github-actions github-actions Bot removed the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/physical-keycodes-1242 branch from 279ca69 to dee0a98 Compare November 22, 2026 04:31
@houko
houko force-pushed the feat/physical-keycodes-1242 branch from dee0a98 to 4667b10 Compare November 22, 2026 08:15
@houko
houko added this pull request to the merge queue Nov 22, 2026
Merged via the queue into nsgo-dev:main with commit 408a36e Nov 22, 2026
15 of 22 checks passed
@houko
houko deleted the feat/physical-keycodes-1242 branch November 22, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android core documentation Improvements or additions to documentation enhancement New feature or request iOS Linux macOS size/XL Web Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant