Download Now | Pricing / Purchase 

DADiSP 6.7 B02 Release Notes

Keyboard Shortcuts

A custom keyboard shortcut is a function or macro that executes when the specified keyboard key is pressed. By default, custom keyboard shortcuts are disabled. To enable:

setconfig("keyboard_shortcuts", 1)

A keyboard shortcut handler is an SPL function or macro where the name of the function or macro specifies the shortcut key. For example:

  /* Ctrl+g shortcut key, generate random noise */
      w0 := gnorm(1000, 1);

Now pressing the Ctrl+g assigns the formula gnorm(1000, 1) to the current Window and generates 1000 samples of random noise. Because keyboard functions result in actions, the := operator is used to assign the Window formula and set the data.

For a shortcut that mimics the Read SPL File pull down command by pressing F12:

  #include <pdc.h>

  // F12 handler

For more information on PDC (pull down command) macros, see pdc.h:

view pdc.h

Supported Keys

Control key presses are handled with ctrl_*_key() functions where * is a letter.

Function key presses are handled with f*_key() functions where * is a number.


Keyboard handlers are case insensitive.

Keyboard handlers result in actions, data is not returned. Use an assignment operator : (Window Assignment), := (Hot Variable Assignment) or = (Variable Assignment) to assign data to a Window or variable.

A handler may be overridden by operating system keyboard sequences.

Command Line