Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiGetClipboard

hiGetClipboard(
s_mode 
) 
=> t_value / nil

Description

Returns the text stored in the system clipboard.

Argument

s_mode

The clipboard buffer to inspect. Possible values are:

  • 'selection: The UNIX middle-mouse-paste selection.
  • 'clipboard: Copies buffer and used during the copy operation in a GUI.

Default value is 'selection.

Value Returned

t_value

The text is stored in the system clipboard.

nil

An invalid argument is specified.

Examples

hiGetClipboard()
=> ""  
hiSetClipboard( "text to copy" )
=> t
hiGetClipboard()
=> "text to copy"
hiGetClipboard( 'clipboard )
=> ""  ; defaults to 'selection, so 'clipboard is not set
hiSetClipboard( "some stuff for the clipboard" 'clipboard)
=> t
hiGetClipboard()
=> "text to copy"
hiGetClipboard( 'clipboard )
=> "some stuff for the clipboard"
hiGetClipboard( 'selection )
=> "text to copy"
hiClearClipboard()
=> t
hiGetClipboard()
=> ""

Additional Information

To configure the clipboard/selection behavior:

  1. Click Klipper – Clipboard tool icon from the right side of the bottom panel.
  2. Choose Configure Klipper from the context menu.

In the General tab, you can choose one of the following options:

Option Description

Synchronize contents of the clipboard and the selection

Synchronizes the content of clipboard and selection buffers.

If this option is selected, the return value of hiGetClipboard( 'clipboard ) and hiGetClipboard( 'selection ) remains the same.

Separate clipboard and selection

Keeps the clipboard and selection buffers separate.

If this option is selected, the hiGetClipboard( 'clibpoard ) returns the text saved using the Copy (Ctrl+v) operation. However, the hiGetClipboard( 'selection )returns the selected text.

This option is selected by default in KDE 3.x.

Related Topics

Functions of Viewfile Window


Return to top
 ⠀
X