joouha / euporie

Jupyter notebooks in the terminal
https://euporie.readthedocs.io
MIT License
1.54k stars 36 forks source link

Key bindings in tmux #61

Closed isaksamsten closed 1 year ago

isaksamsten commented 1 year ago

Hi!

Excellent tool!

I use Alacritty as my terminal (works perfectly) by setting the correct keybindings.

However, I'm unable to get it to work in tmux (with extended-keys on etc).

My workaround is enable support with (https://github.com/tmux/tmux/wiki/Modifier-Keys#extended-keys):

printf '\033[>4;1m'

This workaround makes euporie recognise the ctrl-enter and shift-enter correctly.

Both keys work fine in Neovim in tmux.

Perhaps euporie should enable extended keys support with the above workaround?

Alactritty version: master Tmux: 3.2a

joouha commented 1 year ago

Hi,

Thanks for reporting this.

I think I haven't noticed this issue because I have set -g extended-keys always in my tmux configuration. So in the mean-time, you could also set extended-keys to always in your tmux configuration as a work-around.

It does look like euporie should be signalling that it wants CSI-u mode input by sending the \033[>4;1m escape sequence when it starts. I'll have to check that this does not have consequences for other existing key-bindings in euporie, but I think this can be added.

joouha commented 1 year ago

This should now be fixed by 1be607d7263d139b5de44a46bd26f73bfe709589 in develop :rocket:

joouha commented 1 year ago

The fix is now in the latest release (v2.3.2), so now Ctrl+Enter etc. should work in tmux with extended-keys set to on