To declare a user-defined key, use the following variation of the KEY statement: KEY n%, CHR$(keyboardflag%) + CHR$(scancode%) - n% A value in the range 15 through 25 that identifies the key. - keyboardflag% One of the following values, or a sum of values, specifying whether the user-defined key is used in combination with the Shift, Ctrl, Alt, NumLock, or Caps Lock keys, or with extended keys: Value Key ------------- ----------------------------------- 0 No keyboard flag 1 through 3 Either Shift key 4 Ctrl key 8 Alt key 32 NumLock key 64 Caps Lock key 128 Extended keys on a 101-key keyboard To specify multiple shift states, add the values together. For example, a value of 12 specifies that the user-defined key is used in combination with the Ctrl and Alt keys. - scancode% The scan code for the key being declared. See . See Also