GetShiftState FUNCTION Action Returns the status of one of eight shift states. Syntax variablename% = GetShiftState (bit%) Remarks The GetShiftState procedure uses the following arguments. variablename% ------------- Any BASIC variable name, including the name of a record variable or record element. bit% ---- An integer between 0 and 7, inclusive, that defines which key status is requested. The returned value is TRUE if the state of the key is pressed (Alt, Ctrl, Shift) or On if the key operates as a toggle (Scroll Lock, NumLock, Caps Lock, Ins). If the key is not pressed or On, FALSE (0) is returned. The values for bit% and the keys represented are described as follows. Value Key status (return value) 0 Right Shift pressed (TRUE)-not pressed (FALSE) 1 Left Shift pressed (TRUE)-not pressed (FALSE) 2 Ctrl pressed (TRUE)-not pressed (FALSE) 3 Alt pressed (TRUE)-not pressed (FALSE) 4 Scroll Lock pressed (TRUE)-not pressed (FALSE) 5 NumLock toggle on (TRUE)-off (FALSE) 6 Caps Lock toggle on (TRUE)-off (FALSE) 7 Ins toggle on (TRUE)-off (FALSE) The GetShiftState procedure is used in MENU.BAS to determine whether the Alt key has been pressed, so that user input can be properly processed to select the desired menu item. GetShiftState is also used in WINDOW.BAS when editing edit fields. See Also. MenuDo, MenuEvent, WindowDo