ConInShift function



Bitmask& = ConInShift


Legacy Syntax:

Bitmask& = INSHIFT


Pseudo-object Syntax:

Bitmask& = CON.INSHIFT


Returns the state of the keyboard shift and lock keys.


The value returned is a bitmask indicating the state of the keyboard Shift, Ctrl, Alt and lock keys, as of the last keystroke or mouse event returned by ConInKey$ or ConWaitKey$:


  1 = Right-Alt         32 = Num Lock

  2 = Left-Alt          64 = Scroll Lock

  4 = Right-Ctrl       128 = Caps Lock

  8 = Left-Ctrl        256 = Enhanced Key

 16 = Shift


Values can be combined. For example, a return value of 17 would indicate that the right-alt and shift keys were both pressed.


The flags can be tested using the standard Windows API constants:














#IF %DEF(%PB_CC32)

  Bitmask& = INSHIFT


  Bitmask& = ConInShift



CON.INSHIFT or CONSOLE.INSHIFT may be substituted for INSHIFT in programs written for PB/CC6.


See also: ConInKey$, ConWaitKey$