mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 15:22:09 +00:00
add XF86 multimedia key cucc.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4410 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4c4a168a01
commit
659b06b769
@ -583,6 +583,7 @@ int keyPressed = 0;
|
||||
void mplMainKeyHandle( int State,int Type,int Key )
|
||||
{
|
||||
int msg = evNone;
|
||||
if ( Type != wsKeyPressed ) return;
|
||||
switch ( Key )
|
||||
{
|
||||
case '.':
|
||||
@ -612,9 +613,19 @@ void mplMainKeyHandle( int State,int Type,int Key )
|
||||
case wsS: msg=evStop; break;
|
||||
case wsp:
|
||||
case wsP: msg=evPlayList; break;
|
||||
default: if ( Type == wsKeyPressed ) vo_x11_putkey( Key ); return;
|
||||
|
||||
case wsXF86LowerVolume: msg=evDecVolume; break;
|
||||
case wsXF86RaiseVolume: msg=evIncVolume; break;
|
||||
case wsXF86Mute: msg=evMute; break;
|
||||
case wsXF86Play: msg=evPlaySwitchToPause; break;
|
||||
case wsXF86Stop: msg=evStop; break;
|
||||
case wsXF86Prev: msg=evPrev; break;
|
||||
case wsXF86Next: msg=evNext; break;
|
||||
case wsXF86Media: msg=evLoad; break;
|
||||
|
||||
default: vo_x11_putkey( Key ); return;
|
||||
}
|
||||
if ( ( msg != evNone )&&( Type == wsKeyPressed ) )
|
||||
if ( msg != evNone )
|
||||
{
|
||||
mplMsgHandle( msg,0 );
|
||||
// mplMainRender=1;
|
||||
|
@ -126,7 +126,18 @@
|
||||
#define wsGrayUp 0xb8 + 256
|
||||
#define wsGrayPageUp 0xb9 + 256
|
||||
|
||||
#define wsKeyNumber 116
|
||||
//Keys for multimedia keyboard
|
||||
|
||||
#define wsXF86LowerVolume 0x11 + 256
|
||||
#define wsXF86RaiseVolume 0x13 + 256
|
||||
#define wsXF86Mute 0x12 + 256
|
||||
#define wsXF86Play 0x14 + 256
|
||||
#define wsXF86Stop 0x15 + 256
|
||||
#define wsXF86Prev 0x16 + 256
|
||||
#define wsXF86Next 0x17 + 256
|
||||
#define wsXF86Media 0x32 + 256
|
||||
|
||||
#define wsKeyNumber 124
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -48,5 +48,14 @@ TwsKeyNames wsKeyNames[ wsKeyNumber ] =
|
||||
{ wsGrayRight, "GrayRight" }, { wsGrayHome, "GrayHome" },
|
||||
{ wsGrayUp, "GrayUp" }, { wsGrayPageUp, "GrayPageUp" },
|
||||
|
||||
{ wsXF86LowerVolume, "XF86LowerVolume" },
|
||||
{ wsXF86RaiseVolume, "XF86RaiseVolume" },
|
||||
{ wsXF86Mute, "XF86Mute" },
|
||||
{ wsXF86Play, "XF86Play" },
|
||||
{ wsXF86Stop, "XF86Stop" },
|
||||
{ wsXF86Prev, "XF86Prev" },
|
||||
{ wsXF86Next, "XF86Next" },
|
||||
{ wsXF86Media, "XF86Media" },
|
||||
|
||||
{ wsKeyNone, "None" }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user