From 87fd92f7375aaea975d1e89a50c7b86a7710f433 Mon Sep 17 00:00:00 2001 From: gwern0 Date: Mon, 28 Nov 2011 22:56:48 +0100 Subject: XMonad.Util.Paste: +alistra's patch for fixing his pasting of things like email address (@) Ignore-this: 4af1af27637fe056792aa4f3bb0403eb darcs-hash:20111128215648-f7719-6c58aa382dcf28e2e79cddfa2b8e5d6cba9a79cd.gz --- XMonad/Util/Paste.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'XMonad/Util') diff --git a/XMonad/Util/Paste.hs b/XMonad/Util/Paste.hs index 8740d57..666d62b 100644 --- a/XMonad/Util/Paste.hs +++ b/XMonad/Util/Paste.hs @@ -54,9 +54,9 @@ pasteSelection :: X () pasteSelection = getSelection >>= pasteString -- | Send a string to the window which is currently focused. This function correctly --- handles capitalization. +-- handles capitalization. Warning: in dealing with capitalized characters, this assumes a QWERTY layout. pasteString :: String -> X () -pasteString = mapM_ (\x -> if isUpper x then pasteChar shiftMask x else pasteChar noModMask x) +pasteString = mapM_ (\x -> if isUpper x || || x `elem` "!@#$%^&*()_+{}:<>?\"" 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. -- cgit v1.2.3