In a terminal emulator like Alacritty, it's possible to send control characters directly to the shell using the alt and control keys. However this gets problematic with keyboard layouts that use the alt key for accessing alternative key characters. This is mainly an issue on macOS since other platforms usually use the AltGr key.
The concrete problem is that when alt is held down, the modified key is received, instead of the normal key. So for example Option + F will generate ƒ instead of f. In iTerm it's possible to pick between sending escapes and sending modified keys, however Alacritty currently can't offer that since winit will always send the modified keys.
Now I'm not really familiar with how this works under the hood in winit, but ideally I'd like an option in the window builder (maybe possible to change at runtime?) to prevent alt from modifying the characters, so that Option + F will still send f.
Alternatively it would be necessary for Alacritty to define its own mappings and ignore the ReceivedCharacter event, which would likely result in a bit of duplication between winit and Alacritty.
More information about this issue can be found here:
alacritty/alacritty#2017
In a terminal emulator like Alacritty, it's possible to send control characters directly to the shell using the alt and control keys. However this gets problematic with keyboard layouts that use the alt key for accessing alternative key characters. This is mainly an issue on macOS since other platforms usually use the
AltGrkey.The concrete problem is that when alt is held down, the modified key is received, instead of the normal key. So for example Option + F will generate
ƒinstead off. In iTerm it's possible to pick between sending escapes and sending modified keys, however Alacritty currently can't offer that since winit will always send the modified keys.Now I'm not really familiar with how this works under the hood in winit, but ideally I'd like an option in the window builder (maybe possible to change at runtime?) to prevent alt from modifying the characters, so that Option + F will still send
f.Alternatively it would be necessary for Alacritty to define its own mappings and ignore the
ReceivedCharacterevent, which would likely result in a bit of duplication between winit and Alacritty.More information about this issue can be found here:
alacritty/alacritty#2017