mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
x11: add XK_Cancel to the list of special keys
Some IR receivers emit this key by default for remote control buttons. Make it mappable.
This commit is contained in:
@@ -194,6 +194,7 @@ static const struct key_name key_names[] = {
|
|||||||
{ MP_KEY_FAVORITES, "FAVORITES" },
|
{ MP_KEY_FAVORITES, "FAVORITES" },
|
||||||
{ MP_KEY_SEARCH, "SEARCH" },
|
{ MP_KEY_SEARCH, "SEARCH" },
|
||||||
{ MP_KEY_SLEEP, "SLEEP" },
|
{ MP_KEY_SLEEP, "SLEEP" },
|
||||||
|
{ MP_KEY_CANCEL, "CANCEL" },
|
||||||
|
|
||||||
// These are kept for backward compatibility
|
// These are kept for backward compatibility
|
||||||
{ MP_KEY_PAUSE, "XF86_PAUSE" },
|
{ MP_KEY_PAUSE, "XF86_PAUSE" },
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
#define MP_KEY_FAVORITES (MP_KEY_MM_BASE+16)
|
#define MP_KEY_FAVORITES (MP_KEY_MM_BASE+16)
|
||||||
#define MP_KEY_SEARCH (MP_KEY_MM_BASE+17)
|
#define MP_KEY_SEARCH (MP_KEY_MM_BASE+17)
|
||||||
#define MP_KEY_SLEEP (MP_KEY_MM_BASE+18)
|
#define MP_KEY_SLEEP (MP_KEY_MM_BASE+18)
|
||||||
|
#define MP_KEY_CANCEL (MP_KEY_MM_BASE+19)
|
||||||
|
|
||||||
/* Function keys */
|
/* Function keys */
|
||||||
#define MP_KEY_F (MP_KEY_BASE+0x40)
|
#define MP_KEY_F (MP_KEY_BASE+0x40)
|
||||||
|
|||||||
@@ -551,6 +551,7 @@ static const struct mp_keymap keymap[] = {
|
|||||||
{XK_Pause, MP_KEY_PAUSE}, {XK_Escape, MP_KEY_ESC},
|
{XK_Pause, MP_KEY_PAUSE}, {XK_Escape, MP_KEY_ESC},
|
||||||
{XK_BackSpace, MP_KEY_BS}, {XK_Tab, MP_KEY_TAB}, {XK_Return, MP_KEY_ENTER},
|
{XK_BackSpace, MP_KEY_BS}, {XK_Tab, MP_KEY_TAB}, {XK_Return, MP_KEY_ENTER},
|
||||||
{XK_Menu, MP_KEY_MENU}, {XK_Print, MP_KEY_PRINT},
|
{XK_Menu, MP_KEY_MENU}, {XK_Print, MP_KEY_PRINT},
|
||||||
|
{XK_Cancel, MP_KEY_CANCEL},
|
||||||
|
|
||||||
// cursor keys
|
// cursor keys
|
||||||
{XK_Left, MP_KEY_LEFT}, {XK_Right, MP_KEY_RIGHT}, {XK_Up, MP_KEY_UP},
|
{XK_Left, MP_KEY_LEFT}, {XK_Right, MP_KEY_RIGHT}, {XK_Up, MP_KEY_UP},
|
||||||
|
|||||||
Reference in New Issue
Block a user