I'm using kitty to run terminal nvim on macOS. I want to use D- (command-key) mappings inside nvim. Because terminals, for reasons I don't understand, don't simply pass command-key chords through to the underlying nvim, this requires a workaround. This is what I currently use in kitty.conf:
map cmd+left send_text all :call feedkeys("\<D-LEFT>")\r map cmd+right send_text all :call feedkeys("\<D-RIGHT>")\r map cmd+up send_text all :call feedkeys("\<D-UP>")\r map cmd+down send_text all :call feedkeys("\<D-DOWN>")\r ...
This works in normal mode, but not in insert mode due to the colon. Nvim provides the
<Cmd> pseudokey (
:help <Cmd>) to replace the
: for writing mode-agnostic command mappings within Vim. But kitty doesn't know anything about
<Cmd>. However, if
<Cmd> is just a stand-in for some bytes, I could just specify these bytes directly in
How can I get the bytes represented by
<Cmd>? Or is there another solution?