Skip to content

fix macOS shifted key normalization - #162

Open
JelloBagel wants to merge 4 commits into
mainfrom
jellobagel-hotkey-layout-normalization
Open

JelloBagel wants to merge 4 commits into
mainfrom
jellobagel-hotkey-layout-normalization

Conversation

@JelloBagel

@JelloBagel JelloBagel commented Nov 24, 2026 •

Copy link
Copy Markdown

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 088f592826d0a0fa4571ce9c87005f1fcd8dc741

Dimension Assessment Rationale
Change confidence 9/10 ↑ 110 browser tests passed using installed Chrome; lint and TypeScript checks passed.
↓ No physical German keyboard or downstream integration test was run.
Diagnosis confidence 9/10 ↑ The US Shift map converted reported non-letter keys such as / to ?; the updated tests verify that digits and symbols now stay unchanged.
↓ Browser event behavior was simulated in tests.
Evidence fit 8/10 ↑ German Shift+7 (/) and modifier+Shift variants are covered by focused cases.
↓ The reported shortcuts-dialog symptom was not reproduced in this package.

On macOS, the US Shift map could convert a character reported by another layout, such as German Shift+7 /, to ?. Modifier+Shift events reporting digits or punctuation had the same layout-dependent mapping.

The Shift map now only uppercases ASCII letters; non-letter event.key values are preserved. Existing macOS modifier+Shift letter normalization remains, as does the separate US-layout Option mapping for Alt combinations.

Modifiers event.key Before After
Shift (German 7 key) / Shift+? Shift+/
Shift = Shift+Plus Shift+=
Meta+Shift 1 Meta+Shift+! Meta+Shift+1
Control+Shift / Control+Shift+? Control+Shift+/
Alt+Shift / Alt+Shift+? Alt+Shift+/
Meta+Shift (letter) x Meta+Shift+X Meta+Shift+X (same)

Validation: 110 browser tests passed using installed Chrome; lint and TypeScript checks passed. No physical German keyboard test was run.

JelloBagel and others added 3 commits November 24, 2026 14:39
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@JelloBagel
JelloBagel marked this pull request as ready for review November 25, 2026 18:06
@JelloBagel
JelloBagel requested a review from a team as a code owner November 25, 2026 18:06
@JelloBagel
JelloBagel requested review from gracepark and an adaptive review from Copilot November 25, 2026 18:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Changes to public macOS modifier+Shift shortcut serialization and matching may break existing bindings, requiring human assessment of downstream compatibility.

No open issues 🎉

What changed in this PR

Fixes macOS hotkey normalization so shifted digits and punctuation from non-US keyboard layouts are preserved rather than converted using US-layout mappings.

Changes:

  • Limits Shift normalization to ASCII letters when another modifier is held.
  • Adds regression coverage for reported symbols and modifier+Shift combinations.
  • Documents the updated behavior and the remaining US-layout Option mapping limitation.
File Description
test/​test.js Reorganizes test cases and adds shifted-symbol and hotkey-matching coverage.
src/​macos-uppercase-layer.ts Removes digit and punctuation mappings, retaining ASCII letter mappings.
src/​hotkey.ts Restricts macOS Shift normalization to combinations with another modifier.
README.md Clarifies letter normalization, preserved symbols, and Option mapping limitations.

Review effort: Balanced (adaptive)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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