Show / Hide Table of Contents

    Class KeyEvent

    Describes a keyboard event.
    Inheritance
    System.Object
    KeyEvent
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public class KeyEvent

    Constructors

    KeyEvent()

    Constructs a new KeyEvent
    Declaration
    public KeyEvent()

    KeyEvent(Key)

    Constructs a new KeyEvent from the provided Key value - can be a rune cast into a Key value
    Declaration
    public KeyEvent(Key k)
    Parameters
    Type Name Description
    Key k

    Fields

    Key

    Symb olid definition for the key.
    Declaration
    public Key Key
    Field Value
    Type Description
    Key

    Properties

    IsAlt

    Gets a value indicating whether the Alt key was pressed (real or synthesized)
    Declaration
    public bool IsAlt { get; }
    Property Value
    Type Description
    System.Boolean true if is alternate; otherwise, false.

    IsCtrl

    Determines whether the value is a control key (and NOT just the ctrl key)
    Declaration
    public bool IsCtrl { get; }
    Property Value
    Type Description
    System.Boolean true if is ctrl; otherwise, false.

    IsShift

    Gets a value indicating whether the Shift key was pressed.
    Declaration
    public bool IsShift { get; }
    Property Value
    Type Description
    System.Boolean true if is shift; otherwise, false.

    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.
    Declaration
    public int KeyValue { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()
    Back to top Generated by DocFX