string_variable <- Get_Key_String
Get_Key_String is a function that returns a string representation of the last key pressed by the user. If no key has been pressed, it will wait until a key is pressed before returning.
For most keys, Get_Key_String returns a string containing a single character representing that letter or symbol. The chart below shows such routine inputs as well as some of the special function keys.
|
Key(s) Pressed |
String returned by Get_Key_String |
|
a |
"a" |
|
Shift-a |
"A" |
|
Page Down |
"PageDn" |
|
F-1 |
"F1" |
|
Enter |
"Enter" |
|
Esc |
"Esc" |
|
Tab |
"Tab" |
|
Backspace |
"Backspace" |
|
Down Arrow |
"Down" |
|
Up Arrow |
"Up" |
|
Left Arrow |
"Left" |
|
Right Arrow |
"Right" |
|
Insert |
"Insert" |
|
Delete |
"Delete" |
|
\ (Back Slash) |
"\" |
|
Space Bar |
" " |
|
Control-A |
"Ctrl-A" |
Notes: A graphics window must be open when Get_Key_String is called or a run-time error will occur. If the RaptorGraph window is not on top, the user may have to click on it once before it will respond to user keystrokes.
Example: