diff options
-rw-r--r-- | XMonad/Util/Paste.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/XMonad/Util/Paste.hs b/XMonad/Util/Paste.hs index e5c65e6..36399e0 100644 --- a/XMonad/Util/Paste.hs +++ b/XMonad/Util/Paste.hs @@ -23,7 +23,6 @@ import Data.Char (isUpper) import Graphics.X11.Xlib.Misc (stringToKeysym) import XMonad.Util.XSelection (getSelection) - {- $usage Import this module into your xmonad.hs as usual: @@ -47,7 +46,7 @@ pasteSelection = getSelection >>= pasteString -- | Send a string to the window with current focus. This function correctly -- handles capitalization. pasteString :: String -> X () -pasteString = mapM_ (\x -> if isUpper x then pasteChar shiftMask x else pasteChar 0 x) +pasteString = mapM_ (\x -> if isUpper x then pasteChar shiftMask x else pasteChar noModMask x) {- | Send a character to the current window. This is more low-level. Remember that you must handle the case of capitalization appropriately. @@ -77,4 +76,9 @@ sendKeyWindow mods key w = withDisplay $ \d -> do setKeyEvent ev w rootw none mods keycode True sendEvent d w True keyPressMask ev setEventType ev keyRelease - sendEvent d w True keyReleaseMask ev
\ No newline at end of file + sendEvent d w True keyReleaseMask ev + +-- | A null 'KeyMask'. Used when you don't want a character or string shifted, control'd, or what. +-- TODO: This really should be a function in the X11 binding. When noModMask shows up there, remove. +noModMask :: KeyMask +noModMask = 0 |