codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

no longer possible to bind actions to mod2Mask + key #435

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It no longer seems possible to bind an action to mod2Mask + any key, or to 
configure xmonad to treat a key differently depending on whether the NumLock 
modifier is on.

I believe this issue may be related to issue #120.

Note that the template xmonad.hs as of 0.9.1 said the following, noting that
  the ability "to treat numlock status separately" was a feature, and I agree that users should be able to do so if they choose:
-- Set numlockMask = 0 if you don't have a numlock key, or want to treat
-- numlock status separately.

To reproduce (modified from xmonad.hs template):

myNumlockMask   = 0

    -- ... (in keys)
    , ((mod2Mask .|. mod4Mask, xK_KP_Home), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
    , ((mod4Mask, xK_KP_Home), spawn "gmrun")
    -- ...

0.9.1 behavior (0.9.1-2build2 on Ubuntu 10.10):
  NumLock off: Pressing mod4-KP_Home runs gmrun
  NumLock on : Pressing mod4-KP_7 runs dmenu, as expected.

darcs behavior:
  NumLock off: Pressing mod4-KP_Home runs gmrun
  NumLock on : Pressing mod4-KP_7 runs gmrun, not dmenu. The user with the above config would expect dmenu.

Original issue reported on code.google.com by pluni...@gmail.com on 13 Feb 2011 at 3:07

GoogleCodeExporter commented 8 years ago
Does setting the numlockMask with this function in the startupHook work:

setNumLockMask m = modify (\x -> x { numberlockMask = x })

A better description is here:

http://www.haskell.org/haskellwiki/Xmonad/Notable_changes_since_0.9#Updates_that
_require_changes_in_xmonad.hs

Original comment by vogt.a...@gmail.com on 8 Mar 2011 at 1:20

GoogleCodeExporter commented 8 years ago
That code looks like it would make an infinite type error (though I haven't 
tried it). Did you mean this, instead?

setNumLockMask m = modify (\x -> x { numberlockMask = m })

Original comment by daniel.w...@gmail.com on 8 Mar 2011 at 7:46

GoogleCodeExporter commented 8 years ago
Yeah, that's what I intended.

Original comment by vogt.a...@gmail.com on 11 Mar 2011 at 3:43