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 #include /* allow detectable autorepeate */ +#ifdef WITH_XF86KEYSYM +#include +#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);