Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Version 3 Technical Highlights - KBStatus===== ^Published By^Date^Version^Knowledge Level^Keywords^ |Sprezzatura Ltd|01 OCT 1992|3.0+|EXPERT|KBSTATUS| A function which returns an integer which indicates which special keyboard keys are pressed down at the time that the routine is called. To find out whether a particular key is active it is necessary to BITAND the result with a specific integer as shown in the following table. If the BITAND returns false then the key is not pressed. |1|The Right Shift key| |2|The Left Shift Key| |3|Left/Right Shift| |4|The Ctrl Key| |8|The Alt Key| |16|The Scroll Lock Key| |32|The Num Lock Key| |64|The Caps Lock Key| |128|Insert Key| Thus to check whether the user was pressing Right-Shifted-Alt the following code segment would suffice <code> Declare Function KbStatus Loop Input X,-1 Until X = \1B\ If BitAnd(KbStatus(),1) Then If BitAnd(KbStatus(),8) Then Print Char(7) : End End Repeat </code> (Volume 4, Issue 5, Pages 11,12) tips/revmedia/v4i5a6.txt Last modified: 2024/06/19 20:20by 127.0.0.1