Escape key and multiple actions

Hi there! I would like to know(if possible) how to make the key escape do whatever it does as default behaviour and also do something more at the same time. In my case I also want to: spawn "conkeror -f unfocus". This is mycode which binds the escape key making it useless in all other applications. xmonad $ defaultConfig { modMask = mod4Mask , keys = \c -> mykeys c `M.union` keys defaultConfig c , terminal = "xterm" , workspaces = workspaces' , manageHook = manageHook' <+> manageHook defaultConfig -- , layoutHook = layoutHook' , startupHook = startupHook' } where mykeys (XConfig {modMask = modm}) = M.fromList $ [ ((0 , xK_Escape), spawn "conkeror -f unfocus") ] Thanks in advance.

Quoting Mattias Pettersson
I would like to know(if possible) how to make the key escape do whatever it does as default behaviour and also do something more at the same time.
I've never seen a really satisfactory way to do this. It's one of xmonad's few warts, I think. ~d

Maybe sendKey could help you. Have you tried something like this?
import XMonad.Util.Paste
[ ((0, xK_u), do
spawn "..."
sendKey 0 xK_u
) ]
I tested it for a minute and it looks promising. Let us know what you find out.
Cheers,
Hendrik
On Thu, Apr 8, 2010 at 1:18 AM, Mattias Pettersson
Hi there!
I would like to know(if possible) how to make the key escape do whatever it does as default behaviour and also do something more at the same time. In my case I also want to: spawn "conkeror -f unfocus".
This is mycode which binds the escape key making it useless in all other applications.
xmonad $ defaultConfig { modMask = mod4Mask , keys = \c -> mykeys c `M.union` keys defaultConfig c , terminal = "xterm" , workspaces = workspaces' , manageHook = manageHook' <+> manageHook defaultConfig -- , layoutHook = layoutHook' , startupHook = startupHook' } where mykeys (XConfig {modMask = modm}) = M.fromList $ [ ((0 , xK_Escape), spawn "conkeror -f unfocus") ]
Thanks in advance. _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- "1 + 1 = 3, for large values of 1."
participants (3)
-
Hendrik Krauß
-
Mattias Pettersson
-
wagnerdm@seas.upenn.edu