mirror of https://github.com/mpv-player/mpv
input: map Num 5 to distinct value when numlock is off
Until now both numlock on and off were mapped to KP5.
This commit is contained in:
parent
80de88361b
commit
b4bbc27d9c
|
@ -93,6 +93,7 @@ static const struct key_name key_names[] = {
|
|||
{ MP_KEY_KPPGUP, "KP_PGUP" },
|
||||
{ MP_KEY_KPPGDOWN, "KP_PGDWN" },
|
||||
{ MP_KEY_KPRIGHT, "KP_RIGHT" },
|
||||
{ MP_KEY_KPBEGIN, "KP_BEGIN" },
|
||||
{ MP_KEY_KPLEFT, "KP_LEFT" },
|
||||
{ MP_KEY_KPDOWN, "KP_DOWN" },
|
||||
{ MP_KEY_KPUP, "KP_UP" },
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
#define MP_KEY_KPLEFT (MP_KEY_KEYPAD+19)
|
||||
#define MP_KEY_KPDOWN (MP_KEY_KEYPAD+20)
|
||||
#define MP_KEY_KPUP (MP_KEY_KEYPAD+21)
|
||||
#define MP_KEY_KPBEGIN (MP_KEY_KEYPAD+22)
|
||||
|
||||
// Mouse events from VOs
|
||||
#define MP_MBTN_BASE ((MP_KEY_BASE+0xA0)|MP_NO_REPEAT_KEY|MP_KEY_EMIT_ON_UP)
|
||||
|
|
|
@ -109,7 +109,7 @@ static const struct key_entry keys[] = {
|
|||
{"\033[B", MP_KEY_DOWN},
|
||||
{"\033[C", MP_KEY_RIGHT},
|
||||
{"\033[D", MP_KEY_LEFT},
|
||||
{"\033[E", MP_KEY_KP5},
|
||||
{"\033[E", MP_KEY_KPBEGIN},
|
||||
{"\033[F", MP_KEY_END},
|
||||
{"\033[H", MP_KEY_HOME},
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ static const struct keymap vk_map[] = {
|
|||
|
||||
// numpad without numlock
|
||||
{VK_INSERT, MP_KEY_KPINS}, {VK_END, MP_KEY_KPEND}, {VK_DOWN, MP_KEY_KPDOWN},
|
||||
{VK_NEXT, MP_KEY_KPPGDOWN}, {VK_LEFT, MP_KEY_KPLEFT}, {VK_CLEAR, MP_KEY_KP5},
|
||||
{VK_NEXT, MP_KEY_KPPGDOWN}, {VK_LEFT, MP_KEY_KPLEFT}, {VK_CLEAR, MP_KEY_KPBEGIN},
|
||||
{VK_RIGHT, MP_KEY_KPRIGHT}, {VK_HOME, MP_KEY_KPHOME}, {VK_UP, MP_KEY_KPUP},
|
||||
{VK_PRIOR, MP_KEY_KPPGUP}, {VK_DELETE, MP_KEY_KPDEL},
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ static const struct mp_keymap keymap[] = {
|
|||
/* Numpad without numlock */
|
||||
{XKB_KEY_KP_Insert, MP_KEY_KPINS}, {XKB_KEY_KP_End, MP_KEY_KPEND},
|
||||
{XKB_KEY_KP_Down, MP_KEY_KPDOWN}, {XKB_KEY_KP_Page_Down, MP_KEY_KPPGDOWN},
|
||||
{XKB_KEY_KP_Left, MP_KEY_KPLEFT}, {XKB_KEY_KP_Begin, MP_KEY_KP5},
|
||||
{XKB_KEY_KP_Left, MP_KEY_KPLEFT}, {XKB_KEY_KP_Begin, MP_KEY_KPBEGIN},
|
||||
{XKB_KEY_KP_Right, MP_KEY_KPRIGHT}, {XKB_KEY_KP_Home, MP_KEY_KPHOME},
|
||||
{XKB_KEY_KP_Up, MP_KEY_KPUP}, {XKB_KEY_KP_Page_Up, MP_KEY_KPPGUP},
|
||||
{XKB_KEY_KP_Delete, MP_KEY_KPDEL},
|
||||
|
|
|
@ -799,7 +799,7 @@ static const struct mp_keymap keymap[] = {
|
|||
// numpad without numlock
|
||||
{XK_KP_Insert, MP_KEY_KPINS}, {XK_KP_End, MP_KEY_KPEND},
|
||||
{XK_KP_Down, MP_KEY_KPDOWN}, {XK_KP_Page_Down, MP_KEY_KPPGDOWN},
|
||||
{XK_KP_Left, MP_KEY_KPLEFT}, {XK_KP_Begin, MP_KEY_KP5},
|
||||
{XK_KP_Left, MP_KEY_KPLEFT}, {XK_KP_Begin, MP_KEY_KPBEGIN},
|
||||
{XK_KP_Right, MP_KEY_KPRIGHT}, {XK_KP_Home, MP_KEY_KPHOME}, {XK_KP_Up, MP_KEY_KPUP},
|
||||
{XK_KP_Page_Up, MP_KEY_KPPGUP}, {XK_KP_Delete, MP_KEY_KPDEL},
|
||||
|
||||
|
|
Loading…
Reference in New Issue