alacritty: Cannot use ctrl + / in alacritty

Cannot use ctrl + / in alacrity. Is there any way to enable it? I use ctrl+/ to comment/uncomment out the code in Vim.

in my vimrc, I set the following value to toggle comment which mapped to ctrl + /:

nmap <C-_>   <Plug>NERDCommenterToggle
vmap <C-_>   <Plug>NERDCommenterToggle<CR>gv

Could I set the keymapping on the alacritty setting file to match it?

System

OS: macOS Version: 0.4.2

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

nvm, I forgot that macOS doesn’t have showkey. I’ve tested macOS and it seems like we’re not getting ReceivedCharacter events, when pressing Ctrl + /. You can add this binding yourself for now.

- { key: Slash,   mods: Control,       chars: "\x1f"                 }

it was likely a duplicate of #1359

nvm, I forgot that macOS doesn’t have showkey. I’ve tested macOS and it seems like we’re not getting ReceivedCharacter events, when pressing Ctrl + /. You can add this binding yourself for now.

- { key: Slash,   mods: Control,       chars: "\x1f"                 }

image

ctrl+v -> ctrl+/

means ctrl+v then ctrl+/ ?

Correct. This is usually how you get a shell to print the raw character it receives. So <kbd>esc</kbd> would for example receive ^[, since that’s the control character for escape which is used in all escape sequences.

So <kbd>ctrl</kbd>+<kbd>/</kbd> should show ^_, since that’s the default raw value for that key.

Does that work for you with the <kbd>esc</kbd> key? Also which shell are you using?