diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-12 14:21:06 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-12 14:21:06 +0100 |
commit | 957cf67d50516ba98716f59c9e1cb6412ec1535d (patch) | |
tree | a1f287aee01e4cbb023b2531a5a4b90e9728a8bf /src/keymap.h | |
parent | ea2d407f9c144bb634c59017944e4930ed7f80a2 (diff) | |
download | vim-git-957cf67d50516ba98716f59c9e1cb6412ec1535d.tar.gz |
patch 8.2.1978: making a mapping work in all modes is complicatedv8.2.1978
Problem: Making a mapping work in all modes is complicated.
Solution: Add the <Cmd> special key. (Yegappan Lakshmanan, closes #7282,
closes 4784, based on patch by Bjorn Linse)
Diffstat (limited to 'src/keymap.h')
-rw-r--r-- | src/keymap.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/keymap.h b/src/keymap.h index 4583c6c67..6efb13d06 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -274,6 +274,7 @@ enum key_extra , KE_FOCUSLOST = 99 // focus lost , KE_MOUSEMOVE = 100 // mouse moved with no button down , KE_CANCEL = 101 // return from vgetc() + , KE_COMMAND = 102 // <Cmd> special key }; /* @@ -449,11 +450,11 @@ enum key_extra #define K_RIGHTMOUSE TERMCAP2KEY(KS_EXTRA, KE_RIGHTMOUSE) #define K_RIGHTDRAG TERMCAP2KEY(KS_EXTRA, KE_RIGHTDRAG) #define K_RIGHTRELEASE TERMCAP2KEY(KS_EXTRA, KE_RIGHTRELEASE) -#define K_X1MOUSE TERMCAP2KEY(KS_EXTRA, KE_X1MOUSE) -#define K_X1MOUSE TERMCAP2KEY(KS_EXTRA, KE_X1MOUSE) +#define K_X1MOUSE TERMCAP2KEY(KS_EXTRA, KE_X1MOUSE) +#define K_X1MOUSE TERMCAP2KEY(KS_EXTRA, KE_X1MOUSE) #define K_X1DRAG TERMCAP2KEY(KS_EXTRA, KE_X1DRAG) #define K_X1RELEASE TERMCAP2KEY(KS_EXTRA, KE_X1RELEASE) -#define K_X2MOUSE TERMCAP2KEY(KS_EXTRA, KE_X2MOUSE) +#define K_X2MOUSE TERMCAP2KEY(KS_EXTRA, KE_X2MOUSE) #define K_X2DRAG TERMCAP2KEY(KS_EXTRA, KE_X2DRAG) #define K_X2RELEASE TERMCAP2KEY(KS_EXTRA, KE_X2RELEASE) @@ -477,6 +478,8 @@ enum key_extra #define K_CURSORHOLD TERMCAP2KEY(KS_EXTRA, KE_CURSORHOLD) +#define K_COMMAND TERMCAP2KEY(KS_EXTRA, KE_COMMAND) + // Bits for modifier mask // 0x01 cannot be used, because the modifier must be 0x02 or higher #define MOD_MASK_SHIFT 0x02 |