KEY message parameters
When a key is pressed in a dialog, graph or display, a KEY
message is sent to the controlling shell. The message parameter describes which key was pressed, and whether the control and/or shift keys were up or down at the time. A description of the parameter follows. Note that not all keys are sent. Only alphanumerical and some other special keys are sent. The DISPLAY, DIALOG and the GRAPH items send KEY messages.
Please note that the KEY
message parameter is case sensitive.
Alphanumerical Keys
key | control+key | shift+key | control+shift+key | description |
---|---|---|---|---|
a | Ca | A | CA | Note that shift plus an alpha character sends it in upper case. This is the same for all alpha characters. |
1 | C1 | 1 | C1 | The shift key has no effect on a number. This is the same for all numbers. |
Special Keys
key | control+key | shift+key | control+shift+key | description |
---|---|---|---|---|
Fn | CFn | SFn | CSFn | Function key[Fn]; with: n = 1 .. 12 |
left | Cleft | Sleft | CSleft | The left arrow button |
right | Cright | Sright | CSright | The right arrow key |
up | Cup | Sup | CSup | The up arrow key |
down | Cdown | Sdown | CSdown | The down arrow key |
previous | Cprevious | Sprevious | CSprevious | The page up key [PgUp] |
next | Cnext | Snext | CSnext | The page down key [PgDn] |
home | Chome | Shome | CShome | The home key |
end | Cend | Send | CSend | The end key |
insert | Cinsert | Sinsert | CSinsert | The insert key |
delete | Cdelete | Sdelete | CSdelete | The delete key [DEL] |
space | Cspace | Sspace | CSspace | The space bar (blank |
add | Cadd | Sadd | CSadd | The numeric pad add [+] |
subtract | Csubtract | Ssubtract | CSsubtract | The numeric pad subtract [-] |
multiply | Cmultiply | Smultiply | CSmultiply | The numeric pad multiply [*] |
divide | Cdivide | Sdivide | CSdivide | Thenumeric pad divide [/] |
enter | Center | Senter | CSenter | The enter key [RETURN] |
Notes: The key [ESC] (Escape) is never sent as a key message. It is always translated into the message itemtype itemname CANCEL
.Not all [control][key] codes are defined in the ASCII character set and some are directly processed by the system. Therefore some combinations can not be translated and keyname is set to '*
'. For the special keys (replaced with name strings) not all [control] and/or [shift] states are defined.
See the key_messages.sts example script to see this all in action.