Desktop Keyboard
by Alan Wrigley

When run, this program adds an icon to the icon bar. Clicking Menu on the icon displays a menu containing a Quit option. Clicking Select on the icon opens a window containing a number of icons representing keyboard keys. Clicking Select on one of these keys simulates pressing the corresponding key on the keyboard.

The choice and layout of the keys in the window can be altered by modifying the DATA statements at the end of the program !KeyPress.!RunImage. The format is:

DATA left,bottom,right,top,flags
DATA text,keycode

where left, bottom, right and top define the position and size of the icon, flags are the icon flags (as described on page 1181 of the Programmer's Reference Manual), text is the text which is to appear in the icon, and keycode is the code to be generated when the icon is clicked. For normal keys, this is the ASCII value of the character obtained by pressing the key. A list of codes for special keys is given on page 1198 of the Programmer's Reference Manual.
