Fix Cmd+plus zoom on non-US keyboard layouts
Merged
LA
8mo ago+124+124+012345678901234567890123456789-14-14-01234567890123456789
Summary
- fix zoom shortcut matching to consider both
charactersIgnoringModifiers, literalevent.characters, and the current keyboard-layout character for the pressed key code - route shifted literal zoom shortcuts (for example layouts where
+comes from a non-=physical key) to both browser zoom and terminal font zoom paths - add regression tests for shifted-literal
Cmd+Shiftzoom-in routing and keep zoom shortcut matching gated behind command-modifier checks for hot-path performance
Testing
xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination 'platform=macOS' build(pass)xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux-unit -configuration Debug -destination 'platform=macOS' -only-testing:cmuxTests/CmuxWebViewKeyEquivalentTests test(pass)
Issues
- Related: task-jis-cmd-plus-zoom-in
Summary by CodeRabbit
New Features
- Browser zoom shortcuts now work reliably across different keyboard layouts by recognizing both physical key positions and literal character inputs.
- Enhanced zoom shortcut matching to consider keyboard layout variations and shifted key combinations.
Tests
- Added test cases to verify browser zoom shortcuts function correctly with shifted modifiers and alternative physical keys.