[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.141,1.142

Alban Bedel CVS albeu at mplayerhq.hu
Fri Apr 4 17:04:57 CEST 2003


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv16557/libvo

Modified Files:
	x11_common.c 
Log Message:
Support for "internet" or "multimedia" keyboards in X11.
Patch from Jason Tackaberry <tack at auc dot ca>.


Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- x11_common.c	26 Mar 2003 17:02:28 -0000	1.141
+++ x11_common.c	4 Apr 2003 15:04:10 -0000	1.142
@@ -33,6 +33,7 @@
 
 #ifdef HAVE_XF86VM
 #include <X11/extensions/xf86vmode.h>
+#include <X11/XF86keysym.h>
 #endif
 
 #include "../input/input.h"
@@ -403,6 +404,19 @@
 
 extern void mplayer_put_key(int code);
 
+#ifdef XF86XK_AudioPause
+void vo_x11_putkey_ext(int keysym){
+ switch ( keysym )
+  {
+   case XF86XK_AudioPause:    mplayer_put_key(KEY_XF86_PAUSE); break;
+   case XF86XK_AudioStop:     mplayer_put_key(KEY_XF86_STOP); break;
+   case XF86XK_AudioPrev:     mplayer_put_key(KEY_XF86_PREV); break;
+   case XF86XK_AudioNext:     mplayer_put_key(KEY_XF86_NEXT); break;
+   default:
+  }
+}
+#endif
+
 void vo_x11_putkey(int key){
  switch ( key )
   {
@@ -636,6 +650,9 @@
            { 
 	    int key;
             XLookupString( &Event.xkey,buf,sizeof(buf),&keySym,&stat );
+            #ifdef XF86XK_AudioPause
+             vo_x11_putkey_ext( keySym );
+            #endif
 	    key=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) );
 	    #ifdef HAVE_NEW_GUI
 	     if ( ( use_gui )&&( key == wsEnter ) ) break;



More information about the MPlayer-cvslog mailing list