# HG changeset patch # User pontscho # Date 1012322153 0 # Node ID 61e53100353e0b539ab2355298c7457d2675171a # Parent 291832d8d9842ae8875f99655e42d394ec514b5e add XF86 multimedia key cucc. diff -r 291832d8d984 -r 61e53100353e Gui/mplayer/mw.h --- a/Gui/mplayer/mw.h Tue Jan 29 16:27:21 2002 +0000 +++ b/Gui/mplayer/mw.h Tue Jan 29 16:35:53 2002 +0000 @@ -583,6 +583,7 @@ void mplMainKeyHandle( int State,int Type,int Key ) { int msg = evNone; + if ( Type != wsKeyPressed ) return; switch ( Key ) { case '.': @@ -612,9 +613,19 @@ 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; diff -r 291832d8d984 -r 61e53100353e Gui/wm/wskeys.h --- a/Gui/wm/wskeys.h Tue Jan 29 16:27:21 2002 +0000 +++ b/Gui/wm/wskeys.h Tue Jan 29 16:35:53 2002 +0000 @@ -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 { diff -r 291832d8d984 -r 61e53100353e Gui/wm/wsmkeys.h --- a/Gui/wm/wsmkeys.h Tue Jan 29 16:27:21 2002 +0000 +++ b/Gui/wm/wsmkeys.h Tue Jan 29 16:35:53 2002 +0000 @@ -48,5 +48,14 @@ { 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" } };