A module for sending key presses to windows. This modules provides generalized and specialized functions for this task.
Import this module into your xmonad.hs as usual:
And use the functions. They all return
X (), and so are appropriate
for use as keybindings. Example:
, ((m, xK_d), pasteString "foo bar") ]
Don't expect too much of the functions; they probably don't work on complex texts.
Send a string to the window which is currently focused. This function correctly handles capitalization. Warning: in dealing with capitalized characters, this assumes a QWERTY layout.
Send a character to the current window. This is more low-level. Remember that you must handle the case of capitalization appropriately. That is, from the window's perspective:
pasteChar mod2Mask 'F' ~> "f"
You would want to do something like:
pasteChar shiftMask 'F'