title: In xmonad, how to remap CapsLock to Ctrl?
body: <p>I'm new to xmonad, and trying to remap CapsLock to Ctrl.</p>
  
  <p>I think I can do this by adding a <code>~/.xmonad/xmonad.hs</code> file as suggested at this <a href="https://www.howtogeek.com/114728/how-to-use-xmonad-a-tiling-window-manager-for-linux/" rel="nofollow noreferrer">xmonad setup tutorial</a>, and it seems that the <code>xmonad.hs</code> file should look something like the example given at the <a href="https://wiki.haskell.org/Xmonad/Frequently_asked_questions" rel="nofollow noreferrer">xmonad FAQ page</a>.</p>
  
  <pre><code>import XMonad
  
  main = xmonad defaultConfig
           { modMask = mod4Mask
           , terminal = "urxvt"
           }
  </code></pre>
  
  <p>I'm not sure exactly how the various fields there <code>modMask</code>, <code>mod4Mask</code>, <code>terminal</code>, and <code>"urxvt"</code> represent keyboard keys, or what field to use to represent my CapsLock and Ctrl keys.</p>
  
  <p><strong>How exactly do I remap my CapsLock to Ctrl?</strong></p>
  
  <p><strong>Is there documentation somewhere describing the field associated with each key, CapsLock, Ctrl, etc.?</strong></p>
  
  <p>P.S. As a side-note <a href="http://lists.suckless.org/dwm/0706/2715.html" rel="nofollow noreferrer">this</a> mailing list item also says something about xmonad keymay rebinding, but it does not appear to be haskell.</p>