Referencing the Keyboard Keys
The keys on the keyboard are specified by using their corresponding ASCII values. For example, suppose that you wanted your program to wait until the "A" key is pressed. Since the ASCII value for the letter "A" is 65, you could use:
Call wait key (65)
Or, if you didn't know the ASCII value for the letter "A", you could use:
Call wait key (ascii("A"))
Or, you could simply use:
Call wait key ("A")
(When referencing uppercase letters, don't forget to hold the shift key down.
)
Special Keys
In addition to the standard ASCII characters, the keyboard also contains some "special" keys (labelled "Esc", "Tab", etc.) As of Version 10.9.08 and later, each of the "special" keys can be referenced either by its ASCII value (if you know it), or by the key's name:
| ASCII Value | Name |
| 8 | Backspace |
| 9 | Tab |
| 13 | Enter |
| 27 | Esc |
| 32 | Space |
| 274 | Alt |
| 315-324 | F1-F10 |
| 327 | Home |
| 328 | Up Arrow (or Uparrow) |
| 329 | Page Up (or Pageup) |
| 331 | Left Arrow (or Leftarrow) |
| 333 | Right Arrow (or Rightarrow) |
| 335 | End |
| 336 | Down Arrow (or Downarrow) |
| 337 | Page Down (or Pagedown) |
| 338 | Insert |
| 339 | Delete |
| 389-390 | F11-F12 |
(Notice that the first letter of a key's name should be upper case.)
For example, to wait for the "Page Down" key to be pressed, you could use any of the following statements:
Call wait key (337)
Call wait key (Page Down)
Call wait key ("Page Down")
[
Webmaster |
FAQ's |
Home Page |
Contact Us ]