INSHIFT function

Purpose

Return the state of the keyboard Shift, Ctrl and/or Alt keys, as of the last keystroke or mouse event retrieved by INKEY$ or WAITKEY$.

Syntax

status% = INSHIFT

Remarks

The status% variable receives a bitmask with the shift status:

status%

Definition

1

Right-Alt

2

Left-Alt

4

Right-Ctrl

8

Left-Ctrl

16

Shift

32

Numlock

64

Scroll Lock

128

Caps Lock

256

Enhanced Key

Values can be combined, for example status% = 17 if the right-alt and shift keys were both active.

See also

BIT functionINKEY$, WAITKEY$, WAITSTAT