Skip to content

Conversation

@martinemde
Copy link

@martinemde martinemde commented Nov 4, 2025

Dvorak input (and presumably others) on MacOS causes certain keys to not work as expected: [ ] and =.

Related

This fixes #8743 as well as an unmentioned problem where bracket navigation and equalize panes are also broken.

This is similar to #8759 but fixes more of the combos. Switching the + binding was not enough to fix the problem for me since the right bracket physical keys is where equals should be and overrides the combo.

What this PR does

Switches several default keybindings from physical key codes
.physical = .equal // or .bracket_left or .bracket_right to .unicode = '=' // or '[' or ']'
to support alternative keyboard layouts like Dvorak and keyboards with dedicated plus keys.

Details

In testing, I found that all of these bindings need to be fixed otherwise the bracket physical keys overshadows the dvorak plus key.

This seems like the right solution for the same reason that we don't use any physical letter or number keys. They move around with different layouts and =, [, and ] are no different than other keys like - and 0 which use unicode in other default keybinds.

With this fix, tab and pane navigation (cmd+[], cmd+shift+[]), as well as increase font size (cmd+shift+equals and cmd+equals) and equalize panes (ctrl+cmd+=) now work as expected on dvoark layout on MacOS.

Note, I switch between dvorak virtual layout on the laptop and a physical dvorak keyboard (passed through qwerty input) so my combos would need to change depending on which keyboard I was using if we used physical keys only.

I consulted Claude Code to help try to understand what order and precedence was being applied in this change, but I wrote and tested the code myself (however, this is my first zig code so take that with a grain of salt).

Switches several default keybindings from physical key codes

`.physical = .equal // or .bracket_left or .bracket_right`

to unicode characters

`.unicode = '=' // or '[' or ']'`

to support alternative keyboard layouts like Dvorak and
keyboards with dedicated plus keys (like German layouts).

I found in testing that all of these must be fixed at once otherwise
the bracket physical keys overshadew the correct (for dvorak) plus key.
With this fix, tab and pane navigation (cmd+[], cmd+shift+[]), as well
as cmd+shift+equals and cmd+equals work as expected on dvoark layout on MacOS.
@martinemde martinemde changed the title switch certain physical keybinds to unicode to fix alternate keyboard layouts config: fix physical -> unicode keybinds for alternate keyboard layouts Nov 5, 2025
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.

1 participant