Commit aeb250f7 authored by Francois Cartegnie's avatar Francois Cartegnie

vlc_keys: define mouse's middle, 4 & 5 buttons.

The same way as Wheel left/right, allow to use
those buttons for GUI shortcuts.
parent 6c2f2728
...@@ -81,6 +81,10 @@ ...@@ -81,6 +81,10 @@
#define KEY_MEDIA_STOP 0x004B0000 #define KEY_MEDIA_STOP 0x004B0000
#define KEY_MEDIA_PLAY_PAUSE 0x004C0000 #define KEY_MEDIA_PLAY_PAUSE 0x004C0000
#define KEY_MOUSEBUTTON_MID 0x00ED0000
#define KEY_MOUSEBUTTON_X1 0x00EE0000
#define KEY_MOUSEBUTTON_X2 0x00EF0000
#define KEY_MOUSEWHEELUP 0x00F00000 #define KEY_MOUSEWHEELUP 0x00F00000
#define KEY_MOUSEWHEELDOWN 0x00F10000 #define KEY_MOUSEWHEELDOWN 0x00F10000
#define KEY_MOUSEWHEELLEFT 0x00F20000 #define KEY_MOUSEWHEELLEFT 0x00F20000
......
...@@ -36,6 +36,8 @@ enum ...@@ -36,6 +36,8 @@ enum
MOUSE_BUTTON_WHEEL_DOWN, MOUSE_BUTTON_WHEEL_DOWN,
MOUSE_BUTTON_WHEEL_LEFT, MOUSE_BUTTON_WHEEL_LEFT,
MOUSE_BUTTON_WHEEL_RIGHT, MOUSE_BUTTON_WHEEL_RIGHT,
MOUSE_BUTTON_X1,
MOUSE_BUTTON_X2,
MOUSE_BUTTON_MAX MOUSE_BUTTON_MAX
}; };
......
...@@ -85,6 +85,9 @@ static const struct key_descriptor_s vlc_keys[] = ...@@ -85,6 +85,9 @@ static const struct key_descriptor_s vlc_keys[] =
{ "Media Prev Track", KEY_MEDIA_PREV_TRACK }, { "Media Prev Track", KEY_MEDIA_PREV_TRACK },
{ "Media Stop", KEY_MEDIA_STOP }, { "Media Stop", KEY_MEDIA_STOP },
{ "Menu", KEY_MENU }, { "Menu", KEY_MENU },
{ "Mouse Button Mid", KEY_MOUSEBUTTON_MID },
{ "Mouse Button X1", KEY_MOUSEBUTTON_X1 },
{ "Mouse Button X2", KEY_MOUSEBUTTON_X2 },
{ "Mouse Wheel Down", KEY_MOUSEWHEELDOWN }, { "Mouse Wheel Down", KEY_MOUSEWHEELDOWN },
{ "Mouse Wheel Left", KEY_MOUSEWHEELLEFT }, { "Mouse Wheel Left", KEY_MOUSEWHEELLEFT },
{ "Mouse Wheel Right", KEY_MOUSEWHEELRIGHT }, { "Mouse Wheel Right", KEY_MOUSEWHEELRIGHT },
......
...@@ -72,7 +72,8 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button) ...@@ -72,7 +72,8 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
} }
case MOUSE_BUTTON_CENTER: case MOUSE_BUTTON_CENTER:
var_ToggleBool(vout->p_libvlc, "intf-toggle-fscontrol"); var_ToggleBool(vout->p_libvlc, "intf-toggle-fscontrol");
return; key = KEY_MOUSEBUTTON_MID;
break;
case MOUSE_BUTTON_RIGHT: case MOUSE_BUTTON_RIGHT:
var_SetBool(vout->p_libvlc, "intf-popupmenu", true); var_SetBool(vout->p_libvlc, "intf-popupmenu", true);
return; return;
...@@ -80,6 +81,8 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button) ...@@ -80,6 +81,8 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
case MOUSE_BUTTON_WHEEL_DOWN: key = KEY_MOUSEWHEELDOWN; break; case MOUSE_BUTTON_WHEEL_DOWN: key = KEY_MOUSEWHEELDOWN; break;
case MOUSE_BUTTON_WHEEL_LEFT: key = KEY_MOUSEWHEELLEFT; break; case MOUSE_BUTTON_WHEEL_LEFT: key = KEY_MOUSEWHEELLEFT; break;
case MOUSE_BUTTON_WHEEL_RIGHT: key = KEY_MOUSEWHEELRIGHT; break; case MOUSE_BUTTON_WHEEL_RIGHT: key = KEY_MOUSEWHEELRIGHT; break;
case MOUSE_BUTTON_X1: key = KEY_MOUSEBUTTON_X1; break;
case MOUSE_BUTTON_X2: key = KEY_MOUSEBUTTON_X2; break;
} }
vout_SendEventKey(vout, key); vout_SendEventKey(vout, key);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment