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
This commit is contained in:
Olivier G-R
2019-03-26 20:44:59 +01:00
committed by Justin M. Keyes
parent 33f99431dc
commit f6fb370b1b
6 changed files with 147 additions and 41 deletions

View File

@@ -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 */