Personal tools

Xmonad/Key codes

From HaskellWiki

< Xmonad(Difference between revisions)
Jump to: navigation, search
(Haskell Graphics.X11 keysym definitions: rm long keysym list; encourage EZConfig instead, include hackage X11 links and summary of X11 Types modules)
m (Haskell Graphics.X11 keysym definitions: clarify 'Here is xmonad-extras')
 
(One intermediate revision by one user not shown)
Line 4: Line 4:
 
[http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-EZConfig.html XMonad.Util.EZConfig]
 
[http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-EZConfig.html XMonad.Util.EZConfig]
 
module supports the key you are binding. EZConfig bindings use a more human friendly syntax than the default raw haskell bindings. An example is:
 
module supports the key you are binding. EZConfig bindings use a more human friendly syntax than the default raw haskell bindings. An example is:
<hask>("M-S-<XF86AudioMute>", spawn "mute-it")</hask>.
+
<haskell>
  +
-- See xmonad-extras for mpd and volume tools nicer
  +
-- than a collection of shell scripts.
  +
("M-S-<XF86AudioMute>", spawn "mute-it.sh")
  +
</haskell>
  +
Here is the [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmonad-extras xmonad-extras] package referred to in the comments above.
   
Otherwise, the
+
If you need something EZConfig doesn't provide, see the
 
[http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11 hackage X11 package page] has links to the current '''Types''' and '''ExtraTypes.*''' modules where keysyms are defined. '''Types''' contains the basics, media keys are in '''ExtraTypes.XF86''', and
 
[http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11 hackage X11 package page] has links to the current '''Types''' and '''ExtraTypes.*''' modules where keysyms are defined. '''Types''' contains the basics, media keys are in '''ExtraTypes.XF86''', and
 
international keyboard symbols are in '''Extra.Types.XorgDefault'''
 
international keyboard symbols are in '''Extra.Types.XorgDefault'''
   
You can also search in <code>/usr/include/X11/keysymdef.h</code>
+
You can also search in <code>/usr/include/X11/keysymdef.h</code> and lower-case the first character (XK* becomes xK*).

Latest revision as of 21:42, 3 December 2011

[edit] Haskell Graphics.X11 keysym definitions

First look to see if the XMonad.Util.EZConfig module supports the key you are binding. EZConfig bindings use a more human friendly syntax than the default raw haskell bindings. An example is:

-- See xmonad-extras for mpd and volume tools nicer
-- than a collection of shell scripts.
  ("M-S-<XF86AudioMute>", spawn "mute-it.sh")
Here is the xmonad-extras package referred to in the comments above.

If you need something EZConfig doesn't provide, see the hackage X11 package page has links to the current Types and ExtraTypes.* modules where keysyms are defined. Types contains the basics, media keys are in ExtraTypes.XF86, and international keyboard symbols are in Extra.Types.XorgDefault

You can also search in /usr/include/X11/keysymdef.h and lower-case the first character (XK* becomes xK*).