Skip to main content
2 of 3
Replaces the screenshot with text, and capitalises Neovim
Tae
  • 2.2k
  • 14
  • 22

Mapping a "Command" key in neovim / alacritty

I am failing to map Command+T, Command+[ and Command+] keys in Neovim under macOS / Alacritty.

I've reduced my Alacritty to be minimal:

env:
  TERM: xterm-256color
font:
  size: 16
key_bindings:
  - {key: T,        mods: Command, chars: "\×80\xfc\x80t"}
  - {key: LBracket, mods: Command, chars: "\×80\xfc\×80["}
  - {key: Bracket,  mods: Command, chars: "\×80\xfc\×80]"}

And also Neovim's:

vim.kevmap.set('n', '<D-t>', vim.cmd.tabnew)
vim.keymap.set('n', '<D-[>', vim.cmd.tabprevious)
vim.keymap.set('n', '<D-]>', vim.cmd.tabnext)
  1. I went to nvim,

  2. entered the following command,

    echo "\<D-t>"
    
  3. got an output:

    <80><fc><80>t
    
  4. used the output to add a binding in Alacritty:

    - { key: T, mods: Command, chars: "\x80\xfc\x80t" }
    

What am I doing wrong?