Skip to content

SET HOTKEY

Set Hotkey Value and Program to Execute

This directive enables a user to define a hotkey that calls a public program.

SET HOTKEY hotkey-value, "public-program"
hotkey-value
is the value of the hotkey.
public-program
is the name of a public program that will be called when the hotkey is pressed.

This directive became available in Thoroughbred Basic 8.3.0.

The hotkey-value can take two forms:

  • If the hotkey-value is a standard numeral, a function key is the hotkey. Valid values are 1 through the number of function keys defined for your terminal. In this case, 1 specifies F1, 2 specifies F2, and so on.
  • If the hotkey-value is specified as $xx$, a Ctrl sequence is the hotkey. In this case, $01$ specifies Ctrl-A.

If the public-program parameter is blank or null, the hotkey will be cancelled.

Make sure the specified hotkey does not try to override system settings for system hotkeys, particularly if your application will make use of the system defaults for function keys or Ctrl sequences.

Dictionary-IV redefines hotkeys. If your Thoroughbred Basic program makes use of any Dictionary-IV component, your hotkey setting will be lost.

SET HOTKEY 3,"KEYPROG"

If F3 is pressed, the KEYPROG public program will be executed.

SET HOTKEY $01$,"HOTKEYPG"

If Ctrl-A is pressed, the HOTKEYPG program will be executed.

From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF