diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-05-20 14:55:10 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-05-20 14:55:10 +0000 |
commit | cb0cffe6dbe6b980227fc5683529a9478e1547b3 (patch) | |
tree | 9678f9ba73f98bda0c2413c353e0cc42b309fba3 /vncviewer/Viewport.cxx | |
parent | 48c6a128038519b40c6c4f81401e929fadf44de8 (diff) | |
download | tigervnc-cb0cffe6dbe6b980227fc5683529a9478e1547b3.tar.gz tigervnc-cb0cffe6dbe6b980227fc5683529a9478e1547b3.zip |
Add support for multimedia keys.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4437 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer/Viewport.cxx')
-rw-r--r-- | vncviewer/Viewport.cxx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index ee8e539b..15722ca6 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -34,6 +34,10 @@ #include <rfb/keysymdef.h> #endif +#ifndef XF86XK_ModeLock +#include <rfb/XF86keysym.h> +#endif + #include "Viewport.h" #include "CConn.h" #include "OptionsDialog.h" @@ -442,6 +446,40 @@ rdr::U32 Viewport::translateKeyEvent(int keyCode, int origKeyCode, const char *k return XK_KP_Decimal; case FL_KP + '/': return XK_KP_Divide; +#ifdef HAVE_FLTK_MEDIAKEYS + case FL_Volume_Down: + return XF86XK_AudioLowerVolume; + case FL_Volume_Mute: + return XF86XK_AudioMute; + case FL_Volume_Up: + return XF86XK_AudioRaiseVolume; + case FL_Media_Play: + return XF86XK_AudioPlay; + case FL_Media_Stop: + return XF86XK_AudioStop; + case FL_Media_Prev: + return XF86XK_AudioPrev; + case FL_Media_Next: + return XF86XK_AudioNext; + case FL_Home_Page: + return XF86XK_HomePage; + case FL_Mail: + return XF86XK_Mail; + case FL_Search: + return XF86XK_Search; + case FL_Back: + return XF86XK_Back; + case FL_Forward: + return XF86XK_Forward; + case FL_Stop: + return XF86XK_Stop; + case FL_Refresh: + return XF86XK_Refresh; + case FL_Sleep: + return XF86XK_Sleep; + case FL_Favorites: + return XF86XK_Favorites; +#endif case XK_ISO_Level3_Shift: // FLTK tends to let this one leak through on X11... return XK_ISO_Level3_Shift; |