Table of Contents

Class KeyEvent

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Describes a keyboard event.

public class KeyEvent
Inheritance
KeyEvent
Inherited Members

Constructors

KeyEvent()

Constructs a new KeyEvent

KeyEvent(Key, KeyModifiers)

Constructs a new KeyEvent from the provided Key value - can be a rune cast into a Key value

Fields

Key

Symbolic definition for the key.

Properties

IsAlt

Gets a value indicating whether the Alt key was pressed (real or synthesized)

IsCapslock

Gets a value indicating whether the Caps lock key was pressed (real or synthesized)

IsCtrl

Determines whether the value is a control key (and NOT just the ctrl key)

IsNumlock

Gets a value indicating whether the Num lock key was pressed (real or synthesized)

IsScrolllock

Gets a value indicating whether the Scroll lock key was pressed (real or synthesized)

IsShift

Gets a value indicating whether the Shift key was pressed.

KeyValue

The key value cast to an integer, you will typical use this for extracting the Unicode rune value out of a key, when none of the symbolic options are in use.

Methods

ToString()

Pretty prints the KeyEvent