|
Home Site Structure Programming Home Basic Home GUI & OS Home QB Knowledge Base Professor Answers Codename Surena QB Downloads Write Us
Special LinksQB DirectoryNEW Codename Surena Forums |
|
||||||||||||||||||||||||||
|
How to get/set two-state keys status?
You can use POKE and PEEK to get or set the state of two-state keys. If you want to check the state of the keys you should check the bit shown in the table for that key. For example, to check the state of CAPS LOCK key: DEF SEG = 0 IF PEEK(&H417) AND &H40 THEN 'CAPS LOCK is on. END IF And to turn on CAPS LOCK: DEF SEG = 0 POKE &H417, PEEK(&H417) OR &H40 For more information on setting and getting bits within a number, see ht4:How to get/set a bit within a binary number? NOTE: The instructions in this article only work correctly on IBM PC, XT and AT computers. |