You can check for the state of some keyboard keys. My.Computer.Keyboard
allows accomplishing this via six properties. Three are about the Caps-lock, Num-lock, and Scroll-lock keys, whereas the other three allow getting the state (pressed or not) of Alt, Shift, and Ctrl. The following code provides a complete example:
3.138.118.103