Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Allow bytes values for keyboard shortcuts #14369

Open
hacker-DOM opened this issue Mar 13, 2024 · 1 comment
Open

Feature request: Allow bytes values for keyboard shortcuts #14369

hacker-DOM opened this issue Mar 13, 2024 · 1 comment

Comments

@hacker-DOM
Copy link

hacker-DOM commented Mar 13, 2024

Hi there 馃憢

I am using Kitty terminal. I have mappings such as

map cmd+left        send_text all \x1b[57391u
map cmd+right       send_text all \x1b[57392u
map cmd+backspace   send_text all \x1b[57393u

In Zsh and Neovim I catch these bytesequences and execute the appropriate operation (cmd+left goes to the beginning of a line, cmd+right to the end, cmd+backspace deletes from cursor to beginning of the line).


The only issue I have is iPython, because there doesn't seem to be a way to map bytesequences to keyboard shortcuts. Since I have ingrained them so deeply, I end up using them in iPython as well, but often lose the entire prompt on a single invocation (that is for my most frequent one, alt+backspace, which should delete one word back)

@Carreau
Copy link
Member

Carreau commented Mar 17, 2024

Hum interesting. I think the handling is done by prompt toolkit, and I'm not sure if prompt toolkit allow that, so it might need a fix upstream. I'll try to check when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants