Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Alan edited this pageApr 4, 2022 ·3 revisions

For historical reasons, most terminals (except for some modern ones like Kitty, iTerm, and foot) send the exact same keycodes for different keys. For example, the<tab> key sends the same code as<c-i>. When Kakoune receives an ambiguous code, it has to decide what key to decode it to:

This keyDecodes as
<c-m><ret>
<c-j><ret>
<c-i><tab>
<c-h><backspace>

Therefore, if you map a key from the first column, the mapping will not trigger in the regular terminal UI. Instead, you should map the key from the right-hand column to achieve the same effect.

If you really want to map<c-m> instead of<ret> (because<c-m> has some mnemonic value, for example) you can make Kakoune manually trigger the first-column mappings in addition to the second-column mappings:

hook global normal RawKey <ret>       %{ execute-keys -with-maps <c-m>; execute-keys -with-maps <c-j> }hook global normal RawKey <tab>       %{ execute-keys -with-maps <c-i> }hook global normal RawKey <backspace> %{ execute-keys -with-maps <c-h> }

Relevant discussions

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp