Skip to the content.

PromptPlus API:PromptPlusKeyInfoExtensions

Build Publish License NuGet Downloads

Back to List Api

PromptPlusKeyInfoExtensions

Namespace: PPlus

Represents KeyInfo Extensions

public static class PromptPlusKeyInfoExtensions

Inheritance ObjectPromptPlusKeyInfoExtensions

Methods

IsBackwardWord(ConsoleKeyInfo)

Check ConsoleKeyInfo is Backward Word Emacs Key
Alt+B = Moves the cursor backward one word.

public static bool IsBackwardWord(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsCapitalizeOverCursor(ConsoleKeyInfo)

Check ConsoleKeyInfo is Capitalize Over Cursor Emacs Key
Alt+C = Capitalizes the character under the cursor and moves to the end of the word

public static bool IsCapitalizeOverCursor(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsClearAfterCursor(ConsoleKeyInfo)

Check ConsoleKeyInfo is Clear After Cursor Emacs Key
Ctrl+K = Clears the line content after the cursor

public static bool IsClearAfterCursor(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsClearBeforeCursor(ConsoleKeyInfo)

Check ConsoleKeyInfo is Clear Before Cursor Emacs Key
Ctrl+U = Clears the line content before the cursor

public static bool IsClearBeforeCursor(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsClearContent(ConsoleKeyInfo)

Check ConsoleKeyInfo is Clear Emacs Key
Ctrl+L = Clears the content

public static bool IsClearContent(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsClearWordAfterCursor(ConsoleKeyInfo)

Check ConsoleKeyInfo is Clear Word After Cursor Emacs Key
Ctrl+D = Clears the word after the cursor

public static bool IsClearWordAfterCursor(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsClearWordBeforeCursor(ConsoleKeyInfo)

Check ConsoleKeyInfo is Clear Word Before Cursor Emacs Key
Ctrl+W = Clears the word before the cursor

public static bool IsClearWordBeforeCursor(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsForwardWord(ConsoleKeyInfo)

Check ConsoleKeyInfo is Forward Word Emacs Key
Alt+F = Moves the cursor forward one word.

public static bool IsForwardWord(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsLowersCurrentWord(ConsoleKeyInfo)

Check ConsoleKeyInfo is Lowers Current Word Emacs Key
Alt+L = Lowers the case of every character from the cursor’s position to the end of the current words

public static bool IsLowersCurrentWord(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsNoResponseKey(ConsoleKeyInfo)

Check ConsoleKeyInfo is Yes key

public static bool IsNoResponseKey(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsPressBackspaceKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is End Key

public static bool IsPressBackspaceKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘CTRL+H’

Returns

true if equal otherwise false.

IsPressDeleteKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is Delete Key

public static bool IsPressDeleteKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘CTRL+D’

Returns

true if equal otherwise false.

IsPressDownArrowKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is Down Arrow Key

public static bool IsPressDownArrowKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘CTRL+N’

Returns

true if equal otherwise false.

IsPressEndKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is End Key

public static bool IsPressEndKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘CTRL+E’

Returns

true if equal otherwise false.

IsPressEnterKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is Enter Key

public static bool IsPressEnterKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
If true accept ‘CTRL+J’

Returns

true if equal otherwise false.

IsPressEscKey(ConsoleKeyInfo)

Check ConsoleKeyInfo is Esc Key

public static bool IsPressEscKey(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsPressHomeKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is End Key

public static bool IsPressHomeKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘CTRL+A’

Returns

true if equal otherwise false.

IsPressLeftArrowKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is Left Arrow Key

public static bool IsPressLeftArrowKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘CTRL+B’

Returns

true if equal otherwise false.

IsPressPageDownKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is PageDown Key

public static bool IsPressPageDownKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘Alt+N’

Returns

true if equal otherwise false.

IsPressPageUpKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is PageUp Key

public static bool IsPressPageUpKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘Alt+P’

Returns

true if equal otherwise false.

IsPressRightArrowKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is Right Arrow Key

public static bool IsPressRightArrowKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘CTRL+F’

Returns

true if equal otherwise false.

IsPressShiftTabKey(ConsoleKeyInfo)

Check ConsoleKeyInfo is Shift + Tab Key

public static bool IsPressShiftTabKey(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsPressSpaceKey(ConsoleKeyInfo)

Check ConsoleKeyInfo is Space Key

public static bool IsPressSpaceKey(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsPressSpecialKey(ConsoleKeyInfo, ConsoleKey, ConsoleModifiers)

Check ConsoleKeyInfo is Special Key

public static bool IsPressSpecialKey(ConsoleKeyInfo keyinfo, ConsoleKey key, ConsoleModifiers modifier)

Parameters

keyinfo ConsoleKeyInfo
to check

key ConsoleKey
to compare

modifier ConsoleModifiers
to compare

Returns

true if equal otherwise false.

IsPressTabKey(ConsoleKeyInfo)

Check ConsoleKeyInfo is Tab Key

public static bool IsPressTabKey(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsPressUpArrowKey(ConsoleKeyInfo, Boolean)

Check ConsoleKeyInfo is Up Arrow Key

public static bool IsPressUpArrowKey(ConsoleKeyInfo keyinfo, bool emacskeys)

Parameters

keyinfo ConsoleKeyInfo
to check

emacskeys Boolean
if true accept ‘CTRL+P’

Returns

true if equal otherwise false.

IsTransposePrevious(ConsoleKeyInfo)

Check ConsoleKeyInfo is Transpose Previous Emacs Key
Ctrl+T = Transpose the previous two characters

public static bool IsTransposePrevious(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsUppersCurrentWord(ConsoleKeyInfo)

Check ConsoleKeyInfo is Lowers Current Word Emacs Key
Alt+U = Upper the case of every character from the cursor’s position to the end of the current word

public static bool IsUppersCurrentWord(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

IsYesResponseKey(ConsoleKeyInfo)

Check ConsoleKeyInfo is Yes key

public static bool IsYesResponseKey(ConsoleKeyInfo keyinfo)

Parameters

keyinfo ConsoleKeyInfo
to check

Returns

true if equal otherwise false.

ToCase(ConsoleKeyInfo, CaseOptions)

Convert KeyChar to Uppercase / Lowercase

public static ConsoleKeyInfo ToCase(ConsoleKeyInfo keyinfo, CaseOptions value)

Parameters

keyinfo ConsoleKeyInfo
to convert

value CaseOptions
The CaseOptions

Returns

converted


Back to List Api