diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-25 09:46:37 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-25 09:46:37 +0000 |
commit | 0a581e3bf3cb184be828b58a2c6bbd64a568a4d8 (patch) | |
tree | ee983c70a8bc17d12eb4d8d73453351ed3a0e983 /Gui/wm | |
parent | ac46b4486bb52f043b078197a78a7df16cca969d (diff) |
fix two small bug and add multimedia keyboard support ( i tested with Acer AirKey V only )
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6184 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/wm')
-rw-r--r-- | Gui/wm/ws.c | 21 | ||||
-rw-r--r-- | Gui/wm/ws.h | 2 | ||||
-rw-r--r-- | Gui/wm/wskeys.h | 8 |
3 files changed, 21 insertions, 10 deletions
diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c index abda544939..6bcb468565 100644 --- a/Gui/wm/ws.c +++ b/Gui/wm/ws.c @@ -618,14 +618,17 @@ keypressed: if ( Event->xkey.state & ShiftMask ) wsWindowList[l]->Shift=1; if ( Event->xkey.state & LockMask ) wsWindowList[l]->CapsLock=1; #if 0 - keySym=XKeycodeToKeysym( wsDisplay,Event->xkey.keycode,0 ); - if ( keySym != NoSymbol ) - { - keySym=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ); - wsKeyTable[ keySym ]=i; - if ( wsWindowList[l]->KeyHandler ) - wsWindowList[l]->KeyHandler( Event->xkey.state,i,keySym ); - } + { + KeySym keySym; + keySym=XKeycodeToKeysym( wsDisplay,Event->xkey.keycode,0 ); + if ( keySym != NoSymbol ) + { + keySym=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ); + wsKeyTable[ keySym ]=i; + if ( wsWindowList[l]->KeyHandler ) + wsWindowList[l]->KeyHandler( Event->xkey.state,i,keySym ); + } + } #else { int key; @@ -636,7 +639,7 @@ keypressed: XLookupString( &Event->xkey,buf,sizeof(buf),&keySym,&stat ); key=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ); wsKeyTable[ key ]=i; - if ( wsWindowList[l]->KeyHandler ) wsWindowList[l]->KeyHandler( Event->xkey.state,i,key ); + if ( wsWindowList[l]->KeyHandler ) wsWindowList[l]->KeyHandler( Event->xkey.keycode,i,key ); } #endif break; diff --git a/Gui/wm/ws.h b/Gui/wm/ws.h index 870320af3d..e4d7b485d5 100644 --- a/Gui/wm/ws.h +++ b/Gui/wm/ws.h @@ -98,7 +98,7 @@ typedef void (*wsTReDraw)( wsParamDisplay ); typedef void (*wsTReSize)( unsigned int X,unsigned int Y,unsigned int width,unsigned int height ); typedef void (*wsTIdle)( void ); -typedef void (*wsTKeyHandler)( int State,int Type,int Key ); +typedef void (*wsTKeyHandler)( int KeyCode,int Type,int Key ); typedef void (*wsTMouseHandler)( int Button,int X,int Y,int RX,int RY ); typedef void (*wsRemoteHandler)( char * str ); diff --git a/Gui/wm/wskeys.h b/Gui/wm/wskeys.h index 40ef8de363..e0a3ff0fd8 100644 --- a/Gui/wm/wskeys.h +++ b/Gui/wm/wskeys.h @@ -141,6 +141,14 @@ #define wsXF86Next 0x17 + 256 #define wsXF86Media 0x32 + 256 +#define wsXFMMPrev 0x98 +#define wsXFMMStop 0xb1 +#define wsXFMMPlay 0x95 +#define wsXFMMNext 0x93 +#define wsXFMMVolUp 0xad +#define wsXFMMVolDown 0xa6 +#define wsXFMMMute 0x99 + #define wsKeyNumber 128 typedef struct |