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

Cannot map <c-space> #2553

Screwtapello opened this Issue Nov 4, 2018 · 1 comment


None yet
2 participants
Copy link

Screwtapello commented Nov 4, 2018


  1. kak -n
  2. :map global normal <c-space> ": echo ctrl space<ret>"
  3. Press <c-space>


Nothing happens.


"ctrl space" should appear in the bottom-left of the terminal.


<c-space> is not actually a character that appears in an ASCII table, but by the convention that the Control key means "clear the top three bits of the character", <c-space> produces ASCII NUL, and in fact most terminals will send NUL when the user presses <c-space>. Run cat and try it yourself.

In slightly more conventional notation, NUL could also be written as <c-@>, but that form doesn't work either (and is much, much more awkward to type). At least with gnome-terminal, I can also send NUL with <c-2> and ctrl-backtick which I can't type in markdown.

I also can't make <c-space> do anything if I prefix it with <c-v>, or type it in insert mode.

Other non-alphabetic control characters like <c-^> (aka <c-6> and <c-~>) and <c-_> (aka <c-7>) also can't be mapped, but I can type them on the command-line with <c-v> and I can type them in insert mode.


This comment has been minimized.

Copy link

andreyorst commented Nov 10, 2018

well, actually <c-_> (<c-/>, <c-7>) and <c-^> (<c-6>, <c-~>) can be mapped by using Ctrl+v to directly insert keycode as map argument because as you've mentioned, they actually produce a code. And Ctrl+Space doesnt do that. I use this in my config for long time already:

map global normal '�' ': comment-line<ret>' -docstring "<c-/> to comment/uncomment selection"
                   Ctrl+v Ctrl+/ were used here to insert this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment