Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

My.Computer.Keyboard Object Members 

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.

AltKeyDown

Gets a Boolean indicating if the ALT key is down.

This property is available only for non-server applications.

CapsLock

Gets a Boolean indicating if CAPS LOCK is turned on.

This property is available only for non-server applications.

CtrlKeyDown

Gets a Boolean indicating if a CTRL key is down.

This property is available only for non-server applications.

NumLock

Gets a Boolean indicating if NUM LOCK is turned on.

This property is available only for non-server applications.

ScrollLock

Gets a Boolean indicating if SCROLL LOCK is turned on.

This property is available only for non-server applications.

ShiftKeyDown

Gets a Boolean indicating if a SHIFT key is down.

This property is available only for non-server applications.

SendKeys

Sends one or more keystrokes to the active window, as if typed on the keyboard.

This method is available only for non-server applications.

Community Additions

ADD
Show:
© 2015 Microsoft