Share via


Accessing the Keyboard

The My.Computer.Keyboard object provides properties for accessing the current state of the keyboard, such as what keys are currently pressed, and provides a method to send keystrokes to the active window.

Tasks

This table lists tasks associated with the My.Computer.Keyboard object and points to topics demonstrating how to perform each task.

To

See

Determine whether CAPS LOCK is on

How to: Determine If CapsLock is On in Visual Basic

Determine whether the SHIFT key is down

My.Computer.Keyboard.ShiftKeyDown Property

Determine whether the ALT key is down

My.Computer.Keyboard.AltKeyDown Property

Determine whether the CTRL key is down

My.Computer.Keyboard.CtrlKeyDown Property

Determine whether NUM LOCK is on

My.Computer.Keyboard.NumLock Property

Determine whether SCROLL LOCK is on

My.Computer.Keyboard.ScrollLock Property

Start an application and send it keystrokes

How to: Start an Application and Send it Keystrokes (Visual Basic)

See Also

Reference

My.Computer.Keyboard Object

System.Windows.Forms.Keys