Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Clipboard

The Clipboard aptitude provides access to the OS's clipboard.

Index

Interfaces

Methods

Methods

listen

  • listen(includeOliveHelpsEvents: boolean, callback: (clipboardText: string) => void): Promise<Cancellable>
  • Starts listening to changes to the clipboard.

    Parameters

    • includeOliveHelpsEvents: boolean

      if passed in true, callback will be called while olive helps window is in focus

    • callback: (clipboardText: string) => void

      A function that's called whenever the clipboard's contents change.

        • (clipboardText: string): void
        • Parameters

          • clipboardText: string

          Returns void

    Returns Promise<Cancellable>

read

  • read(): Promise<string>
  • Returns Promise<string>

    A Promise resolving with the current contents of the clipboard.

write

  • write(text: string): Promise<void>
  • Writes the provided text into the clipboard.

    Parameters

    • text: string

      A string to write to clipboard

    Returns Promise<void>

Generated using TypeDoc