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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding keybinding for <c-/> does not work #5165

Open
kamurani opened this issue May 3, 2024 · 2 comments
Open

Adding keybinding for <c-/> does not work #5165

kamurani opened this issue May 3, 2024 · 2 comments

Comments

@kamurani
Copy link

kamurani commented May 3, 2024

Question

Hello,

I was trying to add a custom keybinding (to toggle comment blocks) using Ctrl+/. However, with this in my kakrc:

map global normal <c-/> ":comment-line<ret>"

Pressing Ctrl+/ causes the terminal bell error sound, and acts as if I have only pressed / (with the search: prompt appearing).

Is this just a bug, or is / a reserved character in kakoune and can't be used in bindings?

Thanks in advance!

@krobelus
Copy link
Contributor

krobelus commented May 3, 2024

Works here. Which terminal is this?
Mapping <c-/> should in theory work on all terminals, although it might conflict with <c-_> on some

@krobelus
Copy link
Contributor

krobelus commented May 3, 2024

Ok on Konsole mapping <c-/> does not work. As a workaround one can map <c-_>.
Perhaps different from the bug you're seeing but the workaround might work in both cases.
I think the phenomenon here is that \x2F in keyboard input is canonicalized as <c-_>, sidelining the <c-/> alias.

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

No branches or pull requests

2 participants