PreviousCommon Questions and Answers Function Code ListNext

Chapter 18: Key Code List

This chapter provides a list of the key codes used in the dialog definition process (see the chapter Dialog for details). There are five kinds of keys, each of which has associated mnemonics.

18.1 ASCII Keys

The ASCII keys all use a mnemonic that is the key value itself. For example:

A is the character "A"
5 is the character "5"
z is the character "z"
/ is the character "/"

The space character is the only exception. This character is represented by the mnemonic:


18.2 Function Keys

These mnemonics represent the function of the key; however, for the specific keystrokes to achieve each key's function, please refer to your Release Notes.

For Ctrl or Alt keystroke combinations on UNIX, first enable Ctrl or Alt (press "/c" or "/a", respectively), then press the key or sequence required for the second part of the combination. Remember to disable Ctrl or Alt afterward.

F1 – F12 Function keys 1 – 12
CR Carriage Return
CURL CURsor Left
CURR CURsor Right
CURD CURsor Down
BTAB BackTAB key
BS Back Space key
END End key
SF1 – SF12 Shift+Function keys 1 – 12
CF1 – CF12 Ctrl+Function keys 1 – 12
AF1 – AF12 Alt+Function keys 1 – 12
CTHM CTrl+HoMe key
CTEN CTrl+ENd key
CTPU CTrl+Page Up
CTPD CTrl+Page Down
CTLF CTrl+cursor LeFt
CTRT CTrl+cursor RighT
AT0 – AT9 Alt keys 0 – 9
AT– Alt+minus key
AT= Alt+equals key
ATA – ATZ Alt+A – Alt+Z keys
CTA – CTG Ctrl+A – Ctrl+G keys
CTJ – CTL Ctrl+J – Ctrl+L keys
CTN – CTZ Ctrl+N – Ctrl+Z keys
MSL Left mouse button
MSR Right mouse button

18.3 Status Keys

The mnemonics reflect the fact that status keys are recognized only at the moment they are turned on and off. On UNIX, they reflect the logical pressing and releasing of these keys rather than the physical keystrokes.

ALT0 ALT off
CTL1 CTrL on
CTL0 CTrL off
LSH1 Left SHift key on
LSH0 Left SHift key off
RSH1 Right SHift key on
RSH0 Right SHift key off
INS1 INSert key on
INS0 INSert key off
CAP1 CAPs lock on
CAP0 CAPs lock off
NUM1 NUM lock on (Windows only)
NUM0 NUM lock off (Windows only)
SCL1 SCroLl lock on
SCL0 SCroLl lock off

18.4 Any Other Key

The mnemonic for any key other than those previously listed in the dialog is:

ANYO ANY Other key

18.5 Error Key

This is not actually a key, but a type of procedure. The mnemonic:


indicates that the specified actions are invoked whenever an error occurs in the validation routines. This mnemonic, which appears in the key position of the dialog, is typically used to go to an error message panel. (See the chapter Dialog for details about this key.)

18.6 Mouse Support

Mouse support is available via two dialog key mnemonics, MSL and MSR.

The mouse is visible only when Dialog System is waiting for user keyboard input.

The left and right mouse buttons have dialog key mnemonics MSL and MSR respectively. These represent a single click. They can be used in the same way as other keys to drive dialog functions.

Since in general it is required that the action triggered by a mouse click be dependent on the mouse position, the position of the mouse at the time of the click is recorded in the Dialog System control block.

The X and Y coordinates are character positions, with the position 1,1 being top left of the screen. Note that the coordinates are relative to the screen and not to the panel.

The last two fields give the field number and its occurrence if the mouse was positioned within an input field when the mouse was clicked, otherwise zero valued.

The MSL procedure is not triggered when the cursor is already located in the same field as the mouse when the left mouse button is clicked. The cursor simply relocates itself to the mouse location as described above.

There are thus two methods of taking action on a mouse click. These are either by returning to the application (RETC) so the mouse postion can be established and the appropriate action taken, or by using CALLOUT to a user program, which is passed the control block and hence the mouse information, and also the data block which it can modify (or in addition/alternatively the user program can directly set \$REG or the dialog exception condition.

Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousCommon Questions and Answers Function Code ListNext