Programmer Guide/General Descriptions/KEY message parameters: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
Line 81: Line 81:
{|
{|
|-
|-
|
! scope="row" colspan=4|keyname
|
|
|
|
|-
|keyname
| key <nowiki>-</nowiki> description and comment
| key <nowiki>-</nowiki> description and comment
|-
|-
Line 113: Line 107:
|sym is a symbol key and ssym the corresponding symbol if pressed with shift (depends on keyboard layout); e.g. [+] <nowiki>-</nowiki>> '+', [shift][-] -> '_'
|sym is a symbol key and ssym the corresponding symbol if pressed with shift (depends on keyboard layout); e.g. [+] <nowiki>-</nowiki>> '+', [shift][-] -> '_'
|}
|}




{|
{|
|-
|-
|keyname
!key
| key <nowiki>-</nowiki> description and comment
!control+key
|-
!shift+key
| normal
!control+shift+key
|+control
!description
|+shift
|+controlshift
|-
|-
|Fn
|Fn
Line 133: Line 124:
|-
|-
|left
|left
|prefix C<nowiki>|</nowiki>S|CS
|Cleft
|cursor left [<<nowiki>-</nowiki>]
|Sleft
|CSleft
|The left arrow button
|-
|-
|right
|right
|prefix C<nowiki>|</nowiki>S|CS
|Cright
|cursor right [[Right Arrow]]
|Sright
|CSright
|The right arrow key
|-
|-
|up
|up
|prefix C<nowiki>|</nowiki>S|CS
|Cup
|cursor up [[Up Arrow]]
|Sup
|CSup
|The up arrow key
|-
|-
|down
|down
|prefix C<nowiki>|</nowiki>S|CS
|Cdown
|cursor down [[Down Arrow]]
|Sdown
|CSdown
|The down arrow key
|-
|-
|previous
|previous

Revision as of 11:20, 12 December 2017

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.

Please note that the KEY message parameter is case sensitive.

Alpha characters

e.g. for the character 'a'

key control shift message notes
a no no 'a'
a yes no 'Ca'
a no yes 'A'
a yes yes 'CA'

Numerical characters

e.g. for the number '1'

key control shift message notes
1 no no '1'
1 yes no 'C1'
1 no yes '1' same as without shift
1 yes yes 'C1' same as without shift

key

keyname key - description and comment
normal
control shift controlshift
chlowercase Cchlower chupper Cchupper ch is any character key (a – z); e.g.: [control][c] -> 'Cc', [shift][s] -> 'S', [a] -> 'a'
num Cnum snum * num is a numeric key and snum the corresponding symbol if pressed with shift (depends on keyboard layout); e.g. [8] -> '8', [shift][4] -> '$'
sym * ssym * sym is a symbol key and ssym the corresponding symbol if pressed with shift (depends on keyboard layout); e.g. [+] -> '+', [shift][-] -> '_'


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 CS page up [PgUp]
next CS page down [PgDn]
home CS cursor home [Home]
end CS cursor end [End]
insert CS insert [INS]
delete CS delete [DEL]
space CS space bar (blank) [ ]
add CS numeric pad add [+]
subtract CS numeric pad subtract [-]
multiply CS numeric pad multiply [*]
divide CS numeric pad divide [/]
enter CS enter / return 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.

Navigation menu

Personal tools