# Hot key commands

Hot keys allow calling FlashBASIC subroutines from dictionaries
using the Update processor command CTRL+Xnumber (the value of number
is between 0 and 9).

There are 11 dictionary attributes in both the file-defining
and attribute-defining items related to *hot keys*. They are defined as hotkey.all, hotkey0, hotkey1, and so on, through
hotkey9.

Hot key subroutine calls are available in addition
to subroutine calls from output-conversion, correlative or input-conversion.

To call a FlashBASIC subroutine while in the Update processor
on a particular attribute, type CTRL+X*number*.

Only the programs on one dictionary are executed by each command.
There may be more than one subroutine called on an attribute (use
CTRL+V to MultiValue call statements).

The
subroutine that gets executed is dependent on the following set of
priorities:

- If there is a subroutine called on hotkey.all (attribute 20) in the current attribute-defining item, it is executed, regardless of the value of number.

- If there is not a subroutine called on hotkey.all, the subroutine called on attribute 20 + number of the current attribute-defining item is executed. Note: If number = 0, the subroutine on hotkey.0 (attribute 30), if present, is executed.

- If there are no subroutines called in the attribute-defining item, the file-defining item is used.

- If there is a subroutine called on hotkey.all (attribute 20) in the file-defining item, it is executed, regardless of the value of number.

- If there is not a subroutine called on hotkey.all, the subroutine called on attribute 20 + number of the current file-defining item is executed. Note: If number = 0, the subroutine on hotkey.0 (attribute 30), if present, is executed.

The hot key commands are:

| Command | Description |
| --- | --- |
| CTRL+X0 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey0. If a subroutine has been defined, it is executed when CTRL+X0 is executed from within an item in the Update processor. |
| CTRL+X1 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey1. If a subroutine has been defined, it is executed when CTRL+X1 is executed from within an item in the Update processor. |
| CTRL+X2 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey2. If a subroutine has been defined, it is executed when CTRL+X2 is executed from within an item in the Update processor. |
| CTRL+X3 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey3. If a subroutine has been defined, it is executed when CTRL+X3 is executed from within an item in the Update processor. |
| CTRL+X4 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey4. If a subroutine has been defined, it is executed when CTRL+X4 is executed from within an item in the Update processor. |
| CTRL+X5 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey5. If a subroutine has been defined, it is executed when CTRL+X5 is executed from within an item in the Update processor. |
| CTRL+X6 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey6. If a subroutine has been defined, it is executed when CTRL+X6 is executed from within an item in the Update processor. |
| CTRL+X7 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey7. If a subroutine has been defined, it is executed when CTRL+X7 is executed from within an item in the Update processor. |
| CTRL+X8 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey8. If a subroutine has been defined, it is executed when CTRL+X8 is executed from within an item in the Update processor. |
| CTRL+X9 | Invokes a FlashBASIC subroutine called from dictionary attribute hotkey9. If a subroutine has been defined, it is executed when CTRL+X9 is executed from within an item in the Update processor. |
The table below illustrates the rules to interpret hot
key references.

| Attribute | Name | Subroutine call | Update Processor Command |
| --- | --- | --- | --- |
| 20 | hotkey.all | call default | CTRL+X0-9 |
| 21 | hotkey1 | call one | CTRL+X1 |
| 22 | hotkey2 | call two | CTRL+X2 |
| 23 | hotkey3 | call three | CTRL+X3 |
| 24 | hotkey4 | call four | CTRL+X4 |
| 25 | hotkey5 | call five | CTRL+X5 |
| 26 | hotkey6 | call six | CTRL+X6 |
| 27 | hotkey7 | call seven | CTRL+X7 |
| 28 | hotkey8 | call eight | CTRL+X8 |
| 29 | hotkey9 | call nine | CTRL+X9 |
| 30 | hotkey0 | call zero | CTRL+X0 |

## Example(s)

In this example, when the operator
enters CTRL+X1 from the attribute test, the subroutines list.states
and list.country are executed. After list.country completes, control
returns to the Update processor and remains in the item test.

```
:ud filename test
dictionary-code a
attribute-count 5
substitute-header
structure
output-conversion
correlative
attribute-type l
column-width 20
input-conversion
macro
output-macro
description
hotkey.all
hotkey1 call list.states
call list.country
hotkey2
hotkey3
hotkey4
hotkey5
hotkey6
hotkey7
hotkey8
hotkey9
hotkey0
```

## See also

- [Correlative](https://d3codex.com/definitions/correlative/)
- [Defining attributes](https://d3codex.com/attributedefiningitem/defining-attributes/)
- [File-defining items](https://d3codex.com/definitions/file-defining-items/)
- [hotkey.all file](https://d3codex.com/systemfiles/hotkey-all-file/)
- [hotkey0](https://d3codex.com/attributedefiningitem/hotkey0/)
- [hotkey1](https://d3codex.com/attributedefiningitem/hotkey1/)
- [hotkey2](https://d3codex.com/attributedefiningitem/hotkey2/)
- [hotkey3](https://d3codex.com/attributedefiningitem/hotkey3/)
- [hotkey4](https://d3codex.com/attributedefiningitem/hotkey4/)
- [hotkey5](https://d3codex.com/attributedefiningitem/hotkey5/)
- [hotkey6](https://d3codex.com/attributedefiningitem/hotkey6/)
- [hotkey7](https://d3codex.com/attributedefiningitem/hotkey7/)
- [hotkey8](https://d3codex.com/attributedefiningitem/hotkey8/)
- [hotkey9](https://d3codex.com/attributedefiningitem/hotkey9/)
- [input-conversion](https://d3codex.com/attributedefiningitem/input-conversion/)
- [output-conversion](https://d3codex.com/attributedefiningitem/output-conversion/)
- [ud command](https://d3codex.com/tcl/ud-command/)

---
Source: https://d3codex.com/updateprocessor/hot-key-commands/ - part of the D3Codex reference.
