Console: ReadKey

ReadKey

Reads a single key from the console input.



 Public Function ReadKey(
	  Optional ByVal Intercept As Boolean = False ) As ConsoleKeyInfo

Parameters

Intercept
[ByVal] Optional. Boolean. Flags whether the pressed key should be displayed through the console output or not.  

Default: False

Return Values

ConsoleKeyInfo -  A ConsoleKeyInfo object containing information about the the key that was pressed and modifier key states.

Remarks

This method blocks the calling thread until a key is pressed.

Not all keys are read and returned. Modifier keys (Alt, Shift, Control) are not returned, but instead, included in the ConsoleKeyInfo object when a normal key is pressed. This allows the status of the modifier keys to be known during a keypress, such as a Shift-A key combination.

Keys that do not trigger this method to return are ALT, SHIFT, CONTROL, CAPS-LOCK, SCROLL-LOCK, and NUM-LOCK.

See Also

Project CorLib Overview

Class Console Overview