Open porsager opened 3 days ago
try with this comments
Oh - thanks a lot!! A bit disappointed in my search abilities now.
That did the trick, but what is the reason for making this change, and requiring a setting? It's a new thing, so why change the default? It seems odd terminal input is different than the editor.
That did the trick, but what is the reason for making this change, and requiring a setting? It's a new thing, so why change the default? It seems odd terminal input is different than the editor.
The reason is that in terminal applications (most notably vim, emacs) alt+something is frequently used as a hotkey. At the same time macOS uses alt+something to type alternate characters, say, "ß". On a PC keyboard this is usually no problem because you have AltGr for typing alternate characters which is distinct from Alt. On macOS however, you have two functionally identical Alt (Option) keys, so terminals have to manually reinterpret anything that involves them.
My usual solution is to mirror the PC layout in the terminal, i.e. make the right Alt act as AltGr and leave the left the way macOS wants it (window.option_as_alt = "OnlyRight"
in Alacritty).
We're working proper support for mapping distinct actions to left/right alt key (e.g. alt/alt_gr or alt/meta) as well better handling of dead keys '¨', '^', etc in certain locales. There's some more discussion here:
Check for existing issues
Describe the bug / provide steps to reproduce it
Trying to type @ using (
alt + '
), the normal way on a danish keyboard, will type'
instead.Environment
Zed: v0.152.3 (Zed) OS: macOS 14.6.1 Memory: 32 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log