Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>2011-02-19 03:12:34 +0300
committerGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>2011-02-19 03:12:34 +0300
commitbb2d0eb2307b817dea9e41e581abab24508ebeb6 (patch)
tree4eea18cfdd9e2b36fbfcbebb89d2eb0df5c7f63d /intern
parentd36a89c8f41f455895b6e52ce798c36c9debb967 (diff)
Add media keys for XFree86/Xorg based X11.
TODO: setup build systems to define WITH_XF86KEYSYM.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 5e63cc4d10f..68aaaf0f76c 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -47,6 +47,10 @@
#include <X11/keysym.h>
#include <X11/XKBlib.h> /* allow detectable autorepeate */
+#ifdef WITH_XF86KEYSYM
+#include <X11/XF86keysym.h>
+#endif
+
#ifdef __sgi
#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
@@ -1157,6 +1161,16 @@ convertXKey(
GXMAP(type,XK_KP_Multiply, GHOST_kKeyNumpadAsterisk);
GXMAP(type,XK_KP_Divide, GHOST_kKeyNumpadSlash);
+ /* Media keys in some keyboards and laptops with XFree86/Xorg */
+#ifdef WITH_XF86KEYSYM
+ GXMAP(type,XF86XK_AudioPlay, GHOST_kKeyMediaPlay);
+ GXMAP(type,XF86XK_AudioStop, GHOST_kKeyMediaStop);
+ GXMAP(type,XF86XK_AudioPrev, GHOST_kKeyMediaFirst);
+ GXMAP(type,XF86XK_AudioRewind, GHOST_kKeyMediaFirst);
+ GXMAP(type,XF86XK_AudioNext, GHOST_kKeyMediaLast);
+ GXMAP(type,XF86XK_AudioForward, GHOST_kKeyMediaLast);
+#endif
+
/* some extra sun cruft (NICE KEYBOARD!) */
#ifdef __sun__
GXMAP(type,0xffde, GHOST_kKeyNumpad1);