mirror of
https://github.com/mawww/kakoune.git
synced 2024-09-11 04:46:05 +03:00
Created Ambiguous Keys (markdown)
parent
3cc3ca1bfa
commit
8be090bcc2
16
Ambiguous-Keys.md
Normal file
16
Ambiguous-Keys.md
Normal file
@ -0,0 +1,16 @@
|
||||
For historical reasons, most terminals 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 key | Decodes 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> }
|
Loading…
Reference in New Issue
Block a user