aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/keymap.h
diff options
context:
space:
mode:
authorOlivier G-R <olivier@fractalwire.io>2019-03-26 20:44:59 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-03-29 01:11:57 +0100
commitf6fb370b1bcc5f87c72b14c5eb4f29521ab06163 (patch)
tree73ded197a0f51dac3b3d6775112387cb6212d452 /src/nvim/keymap.h
parent33f99431dcd4e71bdb97b6a8d73ac2a76cd7422e (diff)
downloadrneovim-f6fb370b1bcc5f87c72b14c5eb4f29521ab06163.tar.gz
rneovim-f6fb370b1bcc5f87c72b14c5eb4f29521ab06163.tar.bz2
rneovim-f6fb370b1bcc5f87c72b14c5eb4f29521ab06163.zip
keymap: add more (keypad) keycodes #9793
- K_KORIGIN instead of K_KCENTER: This name is similar to what is used by xev. Alternative could be K_KBEGIN as hinted here: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-PC-Style-Function-Keys But I find Begin and Home too similar, and it might induced some confusion. The naming looked related to some old keyboard configuration. - keymap.c: alias KPPeriod to kDel instead of kPoint. This might seems weird, but this is actually the behaviour that should be expected. libtermkey produces "KPPeriod" when num lock is off. To fix this would need to change this name in termkey. closes #9780 closes #9793
Diffstat (limited to 'src/nvim/keymap.h')
-rw-r--r--src/nvim/keymap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/keymap.h b/src/nvim/keymap.h
index baf8963aa8..92d8777382 100644
--- a/src/nvim/keymap.h
+++ b/src/nvim/keymap.h
@@ -256,9 +256,13 @@ enum key_extra {
#define K_ZERO TERMCAP2KEY(KS_ZERO, KE_FILLER)
#define K_UP TERMCAP2KEY('k', 'u')
+#define K_KUP TERMCAP2KEY('K', 'u') /* keypad up */
#define K_DOWN TERMCAP2KEY('k', 'd')
+#define K_KDOWN TERMCAP2KEY('K', 'd') /* keypad down */
#define K_LEFT TERMCAP2KEY('k', 'l')
+#define K_KLEFT TERMCAP2KEY('K', 'l') /* keypad left */
#define K_RIGHT TERMCAP2KEY('k', 'r')
+#define K_KRIGHT TERMCAP2KEY('K', 'r') /* keypad right */
#define K_S_UP TERMCAP2KEY(KS_EXTRA, KE_S_UP)
#define K_S_DOWN TERMCAP2KEY(KS_EXTRA, KE_S_DOWN)
#define K_S_LEFT TERMCAP2KEY('#', '4')
@@ -367,6 +371,7 @@ enum key_extra {
#define K_PAGEDOWN TERMCAP2KEY('k', 'N')
#define K_KPAGEUP TERMCAP2KEY('K', '3') /* keypad pageup (upper R.) */
#define K_KPAGEDOWN TERMCAP2KEY('K', '5') /* keypad pagedown (lower R.) */
+#define K_KORIGIN TERMCAP2KEY('K', '2') /* keypad center */
#define K_KPLUS TERMCAP2KEY('K', '6') /* keypad plus */
#define K_KMINUS TERMCAP2KEY('K', '7') /* keypad minus */