Article ID: 26485
This article was previously published under Q26485
This article has been archived. It is offered "as is" and will no longer be updated.
I am unable to trap the PRINT SCREEN key (on an IBM extended keyboard, such as on an IBM AT) when pressed simultaneously with the ALT, SHIFT, or CTRL key. However, these can be trapped, with the exception of CTRL+PRINT SCREEN, within the QuickBasic editing environment.
These keys can be trapped using GW-Basic Interpreter Version 3.20. The following is a code example:
Response: This problem results because the value &H80 is missing from the keyboardflag argument of the KEY statement. You must add this value whenever you trap the PRINT SCREEN key on an extended keyboard. Make sure the Num Lock, Caps Lock, and Scroll Lock keys are all in the off position when you are trapping keys with this method.
The correct method for trapping the key is as follows:
Article ID: 26485 - Last Review: February 28, 2014 - Revision: 1.2