Int 16h, 02h            Get Shift Status                                  all

Returns the current keyboard shift status.

Entry AH = 02h

Return AL = Shift status

──────────────────────────────────────────────────────────────────

Shift Status (AL)
7 6 5 4 3 2 1 0
1 . . . . . . . Insert locked
. 1 . . . . . . Caps Lock locked
. . 1 . . . . . Num Lock locked
. . . 1 . . . . Scroll Lock locked
. . . . 1 . . . Alt key is pressed
. . . . . 1 . . Ctrl key is pressed
. . . . . . 1 . Left Shift key is pressed
. . . . . . . 1 Right Shift key is pressed

This shift status byte is obtained from the byte at memory
location 0040h:0017h.

See Service 12h to obtain the shift status for the enhanced
(101/102-key) keyboard.