[xmonad] Bug in X.A.Submap

Khudyakov Alexey alexey.skladnoy at gmail.com
Fri Jun 19 06:27:37 EDT 2009


Hello

I've submitted a bug some time ago. I didn't get any response, so I'm reposing 
it to ML. 
http://code.google.com/p/xmonad/issues/detail?id=295


Submap actions don't work when in russian layout. In english
layout it does work without problem. Standard xmonad key bindings
work in both layouts. I'm using version from darcs. 0.8 is
affected to AFAIR.

Layout are set up with XCB.

 $ setxkbmap -model pc104 -layout us,ru -variant basic,winkeys
 $ setxkbmap -option -option \
"grp_led:scroll,grp:shifts_toggle,compose:menu,ctrl:nocaps"



Below is snippet from X.A.Submap. Quick research shown that
keymasks m and m' has bit (1<<13) set when russian layout chosen.
I have no idea how to interpret it. All valid keymasks are <= (1<<12) as 
declared in X11 headers.

> -- | Like 'submap', but executes a default action if the key did not match.
> submapDefault :: X () -> M.Map (KeyMask, KeySym) (X ()) -> X ()
> submapDefault def keys = do
>     XConf { theRoot = root, display = d } <- ask
> 
>     io $ grabKeyboard d root False grabModeAsync grabModeAsync currentTime
> 
>     (m, s) <- io $ allocaXEvent $ \p -> fix $ \nextkey -> do
>         maskEvent d keyPressMask p
>         KeyEvent { ev_keycode = code, ev_state = m } <- getEvent p
>         keysym <- keycodeToKeysym d code 0
>         if isModifierKey keysym
>             then nextkey
>             else return (m, keysym)
> 
>     m' <- cleanMask m
> 
>     maybe def id (M.lookup (m', s) keys)
> 
>     io $ ungrabKeyboard d currentTime


--
  Khudyakov Alexey


More information about the xmonad mailing list