class CryPrompt::Keys

Overview

all the Key entries for easy reference along with several functions for reading and validating several keytypes

Defined in:

keys.cr

Constant Summary

Backspace = "\u007F"
ClearScreen = "\e[2J"
ClearScreenAbove = "\e[1J"
ClearScreenBelow = "\e[J"
Ctrl_A = "\u0001"
Ctrl_B = "\u0002"
Ctrl_C = "\u0003"
Ctrl_D = "\u0004"
Ctrl_Delete = "\e[3;5~"
Ctrl_E = "\u0005"
Ctrl_End = "\e[1;5F"
Ctrl_F = "\u0006"
Ctrl_G = "\a"
Ctrl_H = "\b"
Ctrl_Home = "\e[1;5H"
Ctrl_I = "\t"
Ctrl_Insert = "\e[2;5~"
Ctrl_J = "\n"
Ctrl_K = "\v"
Ctrl_L = "\f"
Ctrl_M = "\r"
Ctrl_N = "\u000E"
Ctrl_O = "\u000F"
Ctrl_P = "\u0010"
Ctrl_PgDown = "\e[6;5~"
Ctrl_PgUp = "\e[5;5~"
Ctrl_Q = "\u0011"
Ctrl_R = "\u0012"
Ctrl_S = "\u0013"
Ctrl_Space = "\u0000"
Ctrl_T = "\u0014"
Ctrl_U = "\u0015"
Ctrl_V = "\u0016"
Ctrl_W = "\u0017"
Ctrl_X = "\u0018"
Ctrl_Y = "\u0019"
Ctrl_Z = "\u001A"
Delete = "\e[3~"
DownArrow = "\e[B"
End = "\e[4~"
F1 = "\eOP"
F10 = "\e[21~"
F12 = "\e[24~"

F11 =

F2 = "\eOQ"
F3 = "\eOR"
F4 = "\eOS"
F5 = "\e[15~"
F6 = "\e[17~"
F7 = "\e[18~"
F8 = "\e[19~"
F9 = "\e[20~"
Home = "\e[1~"
Insert = "\e[2~"
LeftArrow = "\e[D"
Pause = "\u001A"
PgDown = "\e[6~"
PgUp = "\e[5~"
Return = "\r"
RightArrow = "\e[C"
SCORC = "\e[u"
SCOSC = "\e[s"
Shift_Delete = "\e[3;2~"
Shift_DownArrow = "\e[1;2B"
Shift_End = "\e[1;2F"
Shift_Home = "\e[1;2H"

Shift_Insert = "\e[6;2~" # NO IDEA?>?? shift insert is pase in linux terminals.....

Shift_LeftArrow = "\e[1;2D"
Shift_PgDown = "\e[6;2~"
Shift_PgUp = "\e[5;2~"
Shift_RightArrow = "\e[1;2C"
Shift_Tab = "\e[Z"
Shift_UpArrow = "\e[1;2A"
Tab = "\t"
UpArrow = "\e[A"

Class Method Summary

Class Method Detail

def self.alpha_numeric_symbol?(char : String) #

Returns true if a alphanumeric char or symbol ie a-z A-Z 0-9 and !@#$%^&*()_+{}[]|\"':;<>,./?~`"
Does NOT include space


[View source]
def self.alpha_numeric_symbol?(char : Char) #

Returns true if a alphanumeric char or symbol ie a-z A-Z 0-9 and !@#$%^&*()_+{}[]|\"':;<>,./?~`"
Does NOT include space


[View source]
def self.ascii_printable?(char : String) #

returns true if ascii printable ()


[View source]
def self.ascii_printable?(char : Char) #

returns true if ascii printable ()


[View source]
def self.is_arrow?(char : String) #

Returns true if supplied char is an arrow key.


[View source]
def self.is_escaped?(char : String) #

telss if a char is escaped(its a special char ie starts with \e )


[View source]
def self.is_escaped?(char : Char) #

[View source]