QtClipboard API

class autokey.scripting.clipboard_qt.QtClipboard(app)[source]

Read/write access to the X selection and clipboard - QT version

fill_clipboard(contents)[source]

Copy text onto the clipboard

Usage: clipboard.fill_clipboard(contents)

Parameters:

contents – string to be placed onto the clipboard

fill_selection(contents)[source]

Copy text into the selection

Usage: clipboard.fill_selection(contents)

Parameters:

contents – string to be placed in the selection

get_clipboard()[source]

Read text from the clipboard

Usage: clipboard.get_clipboard()

Returns:

text contents of the clipboard

Return type:

str

get_selection()[source]

Read text from the selection

Usage: clipboard.get_selection()

Returns:

text contents of the selection

Return type:

str

set_clipboard_image(path)[source]

Set clipboard to image

Usage: clipboard.set_clipboard_image(path)

Parameters:

path – Path to image file

Raises:

OSError – If path does not exist