Created
October 15, 2016 13:40
-
-
Save pykong/53ebbcab44d5eb108b1dc000e1e6199b to your computer and use it in GitHub Desktop.
Example of how to paste text with pykeyboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from pykeyboard import PyKeyboard | |
k = PyKeyboard() | |
def paste(): | |
# Don't do this: | |
# k.press_key(k.control_key) | |
# k.tap_key('v') | |
# k.release_key(k.control_key) | |
k.type_string('test') # could be used as well | |
if __name__ == '__main__': | |
paste() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment