mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 15:38:33 +00:00
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:

committed by
Justin M. Keyes

parent
33f99431dc
commit
f6fb370b1b
@@ -163,6 +163,7 @@ static const struct key_name_entry {
|
||||
{ K_DEL, "Del" },
|
||||
{ K_DEL, "Delete" }, // Alternative name
|
||||
{ K_KDEL, "kDel" },
|
||||
{ K_KDEL, "KPPeriod" }, // libtermkey name
|
||||
{ K_UP, "Up" },
|
||||
{ K_DOWN, "Down" },
|
||||
{ K_LEFT, "Left" },
|
||||
@@ -171,6 +172,14 @@ static const struct key_name_entry {
|
||||
{ K_XDOWN, "xDown" },
|
||||
{ K_XLEFT, "xLeft" },
|
||||
{ K_XRIGHT, "xRight" },
|
||||
{ K_KUP, "kUp" },
|
||||
{ K_KUP, "KP8" },
|
||||
{ K_KDOWN, "kDown" },
|
||||
{ K_KDOWN, "KP2" },
|
||||
{ K_KLEFT, "kLeft" },
|
||||
{ K_KLEFT, "KP4" },
|
||||
{ K_KRIGHT, "kRight" },
|
||||
{ K_KRIGHT, "KP6" },
|
||||
|
||||
{ K_F1, "F1" },
|
||||
{ K_F2, "F2" },
|
||||
@@ -223,24 +232,36 @@ static const struct key_name_entry {
|
||||
{ K_INS, "Insert" },
|
||||
{ K_INS, "Ins" }, // Alternative name
|
||||
{ K_KINS, "kInsert" },
|
||||
{ K_KINS, "KP0" },
|
||||
{ K_HOME, "Home" },
|
||||
{ K_KHOME, "kHome" },
|
||||
{ K_KHOME, "KP7" },
|
||||
{ K_XHOME, "xHome" },
|
||||
{ K_ZHOME, "zHome" },
|
||||
{ K_END, "End" },
|
||||
{ K_KEND, "kEnd" },
|
||||
{ K_KEND, "KP1" },
|
||||
{ K_XEND, "xEnd" },
|
||||
{ K_ZEND, "zEnd" },
|
||||
{ K_PAGEUP, "PageUp" },
|
||||
{ K_PAGEDOWN, "PageDown" },
|
||||
{ K_KPAGEUP, "kPageUp" },
|
||||
{ K_KPAGEUP, "KP9" },
|
||||
{ K_KPAGEDOWN, "kPageDown" },
|
||||
{ K_KPAGEDOWN, "KP3" },
|
||||
{ K_KORIGIN, "kOrigin" },
|
||||
{ K_KORIGIN, "KP5" },
|
||||
|
||||
{ K_KPLUS, "kPlus" },
|
||||
{ K_KPLUS, "KPPlus" },
|
||||
{ K_KMINUS, "kMinus" },
|
||||
{ K_KMINUS, "KPMinus" },
|
||||
{ K_KDIVIDE, "kDivide" },
|
||||
{ K_KDIVIDE, "KPDiv" },
|
||||
{ K_KMULTIPLY, "kMultiply" },
|
||||
{ K_KMULTIPLY, "KPMult" },
|
||||
{ K_KENTER, "kEnter" },
|
||||
{ K_KENTER, "KPEnter" },
|
||||
{ K_KPOINT, "kPoint" },
|
||||
|
||||
{ K_K0, "k0" },
|
||||
|
Reference in New Issue
Block a user