jesseduffield / lazygit

simple terminal UI for git commands
MIT License
53.57k stars 1.87k forks source link

Use CSI-u/*FixTerms*/*Kitty* keyboard escape sequences #3237

Open stevenxxiu opened 10 months ago

stevenxxiu commented 10 months ago

Is your feature request related to a problem? Please describe. I would love to have proper keyboard escape sequence support.

When I type ( in quick succession in a commit message, ([32;2u appears.

I want to bind Ctrl + Shift + p. LazyGit doesn't appear to handle that case at all.

The keyboard escape sequence is known as CSI-u/fixterms/Kitty keyboard protocol. This is implemented in many apps.

I have this enabled in WezTerm. That's probably the reason why ([32;2u appears.

Describe the solution you'd like Full support of CSI-u/fixterms/Kitty keyboard protocol. I'm sure some Go library handles this. fixterms goes way back to 2011 per Wayback Machine.

Describe alternatives you've considered The only alternative is to abandon the great majority of possible keyboard shortcuts.

Additional context N/A

stefanhaller commented 10 months ago

While there would be a bit of work to do on our side to support this (or rather on gocui's side), it's primarily something that needs to be supported in tcell. They already have an issue for it: https://github.com/gdamore/tcell/issues/671

stevenxxiu commented 10 months ago

Thanks for looking into this. The gocui repo seems rather dead. Is there anything that can be done then if tcell implements it?

stefanhaller commented 10 months ago

This won't be a problem, we have our own gocui fork at https://github.com/jesseduffield/gocui and can make any required changes there.