Skip to content

Instantly share code, notes, and snippets.

@pykong
Created October 15, 2016 13:40
Show Gist options
  • Save pykong/53ebbcab44d5eb108b1dc000e1e6199b to your computer and use it in GitHub Desktop.
Save pykong/53ebbcab44d5eb108b1dc000e1e6199b to your computer and use it in GitHub Desktop.
Example of how to paste text with pykeyboard.
#!/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