Predefined Key ON KEY(n) GOSUB Trap Supersedes User-Defined (36894)
The information in this article applies to:
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
This article was previously published under Q36894 SUMMARY
If a predefined key (such as a key from n=1 through 14) is turned on,
the associated ON KEY(n) GOSUB statement is executed regardless of the
status of the keyboardflag. In other words, a predefined key is
trapped whether or not the key is pressed alone or in conjunction with
the CAPS LOCK, NUM LOCK, SHIFT, CTRL, or ALT keys. The key trap occurs
even if the same key also is defined with a specific keyboardflag
value in a user-defined KEY statement. (User-defined keys are from
n=15 through 20 in QuickBasic Versions 3.00 and earlier, and from n=15
to 25 in QuickBasic Versions 4.00 and later and Basic compiler
Versions 6.00 and 6.00b for MS-DOS and OS/2.)
Unlike trapping predefined keys, trapping user-defined keys IS
dependent on the status of CAPS LOCK, NUM LOCK, SHIFT, CTRL, or ALT
key.
Modification Type: | Major | Last Reviewed: | 11/18/2003 |
---|
Keywords: | KB36894 |
---|
|