diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 09:47:44 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 09:47:44 +0100 |
commit | 22b5bb4358c7531885e5d136270dbebdcf261c11 (patch) | |
tree | 5c78c8f86be5b0cfb7fb596189a77fa8417fbe63 | |
parent | bc4f1660b11f3f3eed4bd7170a30f7c015da026c (diff) | |
download | XMonadContrib-22b5bb4358c7531885e5d136270dbebdcf261c11.tar.gz XMonadContrib-22b5bb4358c7531885e5d136270dbebdcf261c11.tar.xz XMonadContrib-22b5bb4358c7531885e5d136270dbebdcf261c11.zip |
Port Submap
darcs-hash:20071101084744-a5988-65b66876cf5f599fe90241b5c4cd8d0e41d7fbc2.gz
-rw-r--r-- | Submap.hs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -57,14 +57,15 @@ submap keys = do io $ grabKeyboard d root False grabModeAsync grabModeAsync currentTime - keyspec <- io $ allocaXEvent $ \p -> fix $ \nextkey -> do + (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 (cleanMask m, keysym) + else return (m, keysym) io $ ungrabKeyboard d currentTime - whenJust (M.lookup keyspec keys) id + m' <- cleanMask m + whenJust (M.lookup (m', s) keys) id |