mirror of https://github.com/mpv-player/mpv
input/keycodes: add KP_ADD/SUBTRACT/MULTIPLY/DIVIDE keycodes
In general, mpv treats numpad keys as separate inputs. The +-*/ keys however are exceptions so it's not possible to distinguish them from non-numpad keys. This adds keycodes corresponding to these keys so that they can be handled differently.
This commit is contained in:
parent
4e50da3ddc
commit
ab0aaaad39
|
@ -99,6 +99,10 @@ static const struct key_name key_names[] = {
|
||||||
{ MP_KEY_KPDOWN, "KP_DOWN" },
|
{ MP_KEY_KPDOWN, "KP_DOWN" },
|
||||||
{ MP_KEY_KPUP, "KP_UP" },
|
{ MP_KEY_KPUP, "KP_UP" },
|
||||||
{ MP_KEY_KPENTER, "KP_ENTER" },
|
{ MP_KEY_KPENTER, "KP_ENTER" },
|
||||||
|
{ MP_KEY_KPADD, "KP_ADD" },
|
||||||
|
{ MP_KEY_KPSUBTRACT, "KP_SUBTRACT" },
|
||||||
|
{ MP_KEY_KPMULTIPLY, "KP_MULTIPLY" },
|
||||||
|
{ MP_KEY_KPDIVIDE, "KP_DIVIDE" },
|
||||||
{ MP_MBTN_LEFT, "MBTN_LEFT" },
|
{ MP_MBTN_LEFT, "MBTN_LEFT" },
|
||||||
{ MP_MBTN_MID, "MBTN_MID" },
|
{ MP_MBTN_MID, "MBTN_MID" },
|
||||||
{ MP_MBTN_RIGHT, "MBTN_RIGHT" },
|
{ MP_MBTN_RIGHT, "MBTN_RIGHT" },
|
||||||
|
|
|
@ -116,6 +116,10 @@
|
||||||
#define MP_KEY_KPDOWN (MP_KEY_KEYPAD+20)
|
#define MP_KEY_KPDOWN (MP_KEY_KEYPAD+20)
|
||||||
#define MP_KEY_KPUP (MP_KEY_KEYPAD+21)
|
#define MP_KEY_KPUP (MP_KEY_KEYPAD+21)
|
||||||
#define MP_KEY_KPBEGIN (MP_KEY_KEYPAD+22)
|
#define MP_KEY_KPBEGIN (MP_KEY_KEYPAD+22)
|
||||||
|
#define MP_KEY_KPADD (MP_KEY_KEYPAD+23)
|
||||||
|
#define MP_KEY_KPSUBTRACT (MP_KEY_KEYPAD+24)
|
||||||
|
#define MP_KEY_KPMULTIPLY (MP_KEY_KEYPAD+25)
|
||||||
|
#define MP_KEY_KPDIVIDE (MP_KEY_KEYPAD+26)
|
||||||
|
|
||||||
// Mouse events from VOs
|
// Mouse events from VOs
|
||||||
#define MP_MBTN_BASE ((MP_KEY_BASE+0xA0)|MP_NO_REPEAT_KEY|MP_KEY_EMIT_ON_UP)
|
#define MP_MBTN_BASE ((MP_KEY_BASE+0xA0)|MP_NO_REPEAT_KEY|MP_KEY_EMIT_ON_UP)
|
||||||
|
|
Loading…
Reference in New Issue