spock
10/15/2016 - 1:40 PM

Example of how to paste text with pykeyboard.

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()