diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-04-16 11:35:09 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-04-16 11:35:09 -0600 |
| commit | 4114631cb78f5c21a70ae5fe697b8230e965c1fb (patch) | |
| tree | 6baf9a882b5df229d648df3ecb956ca5313bc791 /src/Rahm/Desktop/Submap.hs | |
| parent | e7d0c65ef807cf6d595273a764ec95d17c8708b5 (diff) | |
| parent | 65456557536f7886ae079fa2b980a1ef7f0619c0 (diff) | |
| download | rde-4114631cb78f5c21a70ae5fe697b8230e965c1fb.tar.gz rde-4114631cb78f5c21a70ae5fe697b8230e965c1fb.tar.bz2 rde-4114631cb78f5c21a70ae5fe697b8230e965c1fb.zip | |
Merge branch 'v017' of josher.dev:rde into v017
Diffstat (limited to 'src/Rahm/Desktop/Submap.hs')
| -rw-r--r-- | src/Rahm/Desktop/Submap.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Rahm/Desktop/Submap.hs b/src/Rahm/Desktop/Submap.hs index da9fe77..5db8928 100644 --- a/src/Rahm/Desktop/Submap.hs +++ b/src/Rahm/Desktop/Submap.hs @@ -61,7 +61,7 @@ mapNextStringWithKeysym fn = do ret <- io $ fix $ \nextkey -> do ret <- - getMaskEventWithTimeout 1000 d keyPressMask $ \p -> do + getMaskEventWithTimeout 2000 d keyPressMask $ \p -> do KeyEvent { ev_keycode = code, ev_state = m } <- getEvent p keysym <- keycodeToKeysym d code 0 (_, str) <- lookupString (asKeyEvent p) @@ -76,12 +76,12 @@ mapNextStringWithKeysym fn = do Nothing -> return Nothing io $ ungrabKeyboard d currentTime - case ret of + case ret of Just (m, str, keysym) -> fn m keysym str Nothing -> return () {- Like submap, but on the character typed rather than the kysym. -} -mapNextString :: (KeyMask -> String -> X ()) -> X () +mapNextString :: (KeyMask -> String -> X ()) -> X () mapNextString fn = mapNextStringWithKeysym (\m _ s -> fn m s) submapDefaultWithKey :: ((KeyMask, KeySym) -> X ()) -> Map (KeyMask, KeySym) (X ()) -> X () |