jtdaugherty / vty

A high-level ncurses alternative written in Haskell
BSD 3-Clause "New" or "Revised" License
320 stars 57 forks source link

Handle `Ctrl-h` (backspace) in alacritty #227

Closed vglfr closed 2 years ago

vglfr commented 3 years ago

Alacritty sends \b on Ctrl-h which is not handled by vty. Adding map _ "\b" KBS [] to .vty/config solves it.

It seems reasonable to me to fix it at this level, without forcing alacritty users to create a config file manually. However I'm not sure whether it could be safely extrapolated to other terminals. Also tests seem to pass but I'm a bit uneasy with the lack of test case for this specific combination (cannot find tests for others though).

Found it while investigating https://github.com/smallhadroncollider/taskell/issues/86 (other keybindings discussed at that ticket are taskell-specific issues).

jtdaugherty commented 2 years ago

Thanks for this change! It seems harmless enough to me.

jtdaugherty commented 2 years ago

This change is now released in 5.35.