Module clipboard

Library to handle the system clipboard

Events

paste_trigger This event is emitted to all processes when the external clipboard is pasted using middle mouse button or when Ctrl+V is pressed and the OS clipboard is not empty.

Functions

cut (obj, t) Cut the given object.
copy (obj, t) Copy the given object.
pasteTriggered () Returns whether if the user wants to paste the clipboard.
paste () Get the current content of the clipboard.
retrieve () Lookup the current clipboard object


Events

paste_trigger
This event is emitted to all processes when the external clipboard is pasted using middle mouse button or when Ctrl+V is pressed and the OS clipboard is not empty.

Arguments:

  • uptime number the uptime corresponding to when the event was emitted

Functions

cut (obj, t)
Cut the given object. This means that when the object is pasted, it will also be removed from the clipboard.

Parameters:

  • obj Object to be put in clipboard
  • t string MIME type of the object
copy (obj, t)
Copy the given object.

Parameters:

  • obj Object to be put in clipboard
  • t string MIME type of the object
pasteTriggered ()
Returns whether if the user wants to paste the clipboard. This function is the polling equivalent of the paste_trigger event.

Returns:

    bool Whether the clipboard should be paster
paste ()
Get the current content of the clipboard. If the clipboard object was cutted, then this function also removes it from the clipboard.

Returns:

    clipboard content
retrieve ()
Lookup the current clipboard object

Returns:

    clipboard content
generated by LDoc 1.4.6 Last updated 2021-12-27 19:58:59