title: How to reconfigure the 1..9 workspace keyboard shortcuts in XMonad?
body: <p>I have been a long time user of XMonad until I switched to an ergonomic keyboard layout, namely the Bépo (<a href="http://bepo.fr/wiki/Accueil" rel="nofollow noreferrer">http://bepo.fr/wiki/Accueil</a>).</p>
  
  <p>Until thenI was using the XMonad.Config.Azerty module for my keyboard. But since the layout change the keyboard shorcuts were broken.<br>
  More exactly the workpaces switching ones (home+1=workspace1, home+2=workspace2, etc...).<br>
  I then switched back to the default config but it was not better.<br></p>
  
  <p>I obviously does not need the defaultAzerty function anymore.<br>
  Does someone know what should I be doing to remap the home +1..9 combinaison so that they work.</p>
  
  <p>EDIT : updated config</p>
  
  <p>Here is my config :</p>
  
  <pre><code>{-# LANGUAGE OverloadedStrings #-}
  {-# LANGUAGE Arrows #-}
  
  import XMonad
  import Graphics.X11.ExtraTypes.XF86
  import qualified Data.Map as M
  import qualified XMonad.StackSet as W
  import XMonad.Hooks.DynamicLog
  --
  import XMonad.Layout.NoBorders
  --
  import Data.Ratio
  import XMonad.Layout.PerWorkspace
  import XMonad.Layout.Spacing
  import XMonad.Layout.Grid
  import XMonad.Layout.IM
  
  main :: IO ()
  main = xmonad =&lt;&lt; xmobar myConf
  
  -- |Main configuration, override the defaults to your liking.
  myConf = defaultConfig
     { modMask = mod4Mask
     , terminal = "urxvt"
     , layoutHook = smartBorders $ myLayout
     , workspaces = myWorkspaces
     , keys = myKeys }
  
  -- | Keyboard keys
  homeMask :: KeyMask
  homeMask =  133 -- from the xev data
  
  keysToAdd x =
      [ ((mod4Mask, xK_F4 ), kill)
      , ((0, xF86XK_Calculator ), spawn "mate-calculator")
      , ((0, xF86XK_WWW ), spawn "firefox")
      , ((0, xF86XK_HomePage ), spawn "caja")
      , ((0, xK_Print ), spawn "mate-screenshot")
      , ((mod4Mask, xK_z ), spawn "emacs") ]
      ++
      [((m .|. homeMask, k), windows $ f i) 
         | (i, k) &lt;- zip (XMonad.workspaces defaultConfig) [10 .. 19]
         , (f, m) &lt;- [(W.greedyView, 0), (W.shift, shiftMask)] ]
  
  keysToDel x = [((mod4Mask .|. shiftMask), xK_c)] -- to delete the unused keys
  
  myKeys x = foldr M.delete (keysToAdd' x) (keysToDel x)
    where
      -- to include new keys to existing keys
      keysToAdd' x = M.union (keys defaultConfig x) (M.fromList (keysToAdd x))
  
  -- |Workspaces listing
  myWorkspaces = ["1:main", "2:edit", "3:web", "4:browse", "5:irc", "6:pidgin"]
  
  -- |Default layout
  myLayout = pidgin $ Mirror tiled ||| tiled ||| Full
      where
          -- pidgin conf
          pidgin = onWorkspace "6:pidgin" pidginLayout
          pidginLayout = withIM (18/100) (Role "buddy_list") gridLayout
          gridLayout = spacing 8 $ Grid
  
          -- default tiling algorithm partitions the screen into two panes
          tiled = spacing 2 $ Tall nmaster delta ratio
          -- The default number of windows in the master pane
          nmaster = 1
          -- Default proportion of screen occupied by master pane
          ratio = 2/3
          -- Percent of screen to increment by when resizing panes
          delta = 5/100
  </code></pre>
  
  <p>Also I saw that post but I don't know if it is what I want : <a href="https://stackoverflow.com/questions/14885806/switching-workspaces-in-xmonad-using-programmer-dvorak-keyboard-layout-shifted">Switching workspaces in xmonad using programmer dvorak keyboard layout (shifted numbers)</a><br></p>
  
  <p>I have no problem with the haskell language but the XMonad API is that big.</p>
  
  <p>EDIT2 : following what is written here <a href="http://blacketernal.wordpress.com/set-up-key-mappings-with-xmodmap/" rel="nofollow noreferrer">http://blacketernal.wordpress.com/set-up-key-mappings-with-xmodmap/</a>, my home key is already a modifier</p>
  
  <p>Here is the dump of the last lines : </p>
  
  <blockquote>
    <p>xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):</p>
    
    <p>shift       Shift_L (0x32),  Shift_R (0x3e) lock        Caps_Lock
    (0x42) control     Control_L (0x25),  Control_R (0x69) mod1<br>
    Alt_L (0x40),  Meta_L (0xcd) mod2        Num_Lock (0x4d) mod3<br>
    mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L
    (0xcf) mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)</p>
  </blockquote>