Table of Contents

Method OnKeyDown

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

OnKeyDown(Key)

Low-level API called when the user presses a key, allowing a view to pre-process the key down event. This is called from NewKeyDownEvent(Key) before OnInvokingKeyBindings(Key, KeyBindingScope).

public virtual bool OnKeyDown(Key keyEvent)

Parameters

keyEvent Key

Contains the details about the key that produced the event.

Returns

bool

false if the key press was not handled. true if the keypress was handled and no other view should see it.

Remarks

For processing HotKeys and commands, use Command and Add(Key, params Command[])instead.

Fires the KeyDown event.