[xmonad] Escape key and multiple actions

Hendrik Krauß info at hendrik-krauss.de
Thu Apr 8 02:23:01 EDT 2010


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
<mattiaspgames at gmail.com> wrote:
> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
>



-- 
"1 + 1 = 3, for large values of 1."


More information about the xmonad mailing list