changeset 4409:61e53100353e

add XF86 multimedia key cucc.
author pontscho
date Tue, 29 Jan 2002 16:35:53 +0000
parents 291832d8d984
children 2618318f988b
files Gui/mplayer/mw.h Gui/wm/wskeys.h Gui/wm/wsmkeys.h
diffstat 3 files changed, 34 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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
 {
--- 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" }
  };