title: XMonad won't spawn anything with mod4Mask
body: <p>I have seen a few somewhat similar problems on the Arch forums, but I have not been able to find a solution for this.</p>
  
  <p>So I am running XMonad 0.1 in XFCE4 on Fedora 17 x64, and I have xmonad-contrib installed as well. Here is my xmonad.hs file:</p>
  
  <pre><code>import System.Posix.Env (getEnv)
  import Data.Maybe (maybe)
  import Control.Monad
  import XMonad.Hooks.SetWMName
  import qualified XMonad.StackSet as W
  import XMonad.Util.EZConfig
  
  import XMonad
  import XMonad.Config.Desktop
  import XMonad.Config.Gnome
  import XMonad.Config.Kde
  import XMonad.Config.Xfce
  
  main = do
       session &lt;- getEnv "DESKTOP_SESSION"
       xmonad  $ xfceConfig     --(maybe desktopConfig desktop session)        
          {
          modMask = mod4Mask
          , terminal = "gnome-terminal"
          , logHook = takeTopFocus &gt;&gt; setWMName "LG3D"
          }
          `additionalKeys` [ ((mod4Mask, xK_p), spawn "dmenu_run")
                             ,((mod4Mask, xK_v), spawn "gvim")
              ]
  
  
  -----------------------------------------
  ------------Custom Keys------------------
  -----------------------------------------
  
  
  -----------------------------------------
  ------------Other horrible stuff---------
  -----------------------------------------
  
  desktop "gnome" = gnomeConfig
  desktop "kde" = kde4Config
  desktop "xfce" = xfceConfig
  desktop "xmonad-gnome" = gnomeConfig
  desktop _ = desktopConfig
  
  atom_WM_TAKE_FOCUS ::
    X Atom
  atom_WM_TAKE_FOCUS =
    getAtom "WM_TAKE_FOCUS"
  
  takeFocusX ::
    Window
    -&gt; X ()
  takeFocusX w =
    withWindowSet . const $ do
      dpy       &lt;- asks display
      wmtakef   &lt;- atom_WM_TAKE_FOCUS
      wmprot    &lt;- atom_WM_PROTOCOLS
      protocols &lt;- io $ getWMProtocols dpy w
      when (wmtakef `elem` protocols) $
        io . allocaXEvent $ \ev -&gt; do
            setEventType ev clientMessage
            setClientMessageEvent ev w wmprot 32 wmtakef currentTime
            sendEvent dpy w False noEventMask ev
  
  takeTopFocus ::
    X ()
  takeTopFocus =
    withWindowSet $ maybe (setFocusX =&lt;&lt; asks theRoot) takeFocusX . W.peek
  </code></pre>
  
  <p>You will notice in the <code>additionalKeys</code> part, I have 2 bindings. Both are using <code>mod4Mask</code>, which is also my default mod key. The second binding, for gvim, works perfectly. The problem is that the first binding, for dmenu, simply does nothing. What's strange is that if I change <code>mod4Mask</code> (for dmenu) to <code>mod1Mask</code> then it works. Also, dmenu works fine if I run it from a terminal.</p>
  
  <p>EDIT: mod4Mask and P doesn't seem to spawn / do anything.</p>
  
  <p>Any ideas? This config seems fine to me, I have no idea why it won't work.</p>