Key
@Js
@Serializable { simple=true }
const class Key : Obj
Key models a key code
Lookup by string name or symbol
If this a char symbol such as OpenBracket this is its symbol "["
Key name
Key code
Return name
Is this one of the modifier keys alt, shift, ctrl, meta
Equality is based on name
Hash code is based on name
Lookup by key code
const static Key : a
const static Key : alt
const static Key : b
const static Key : backSlash
const static Key : backspace
const static Key : backtick
const static Key : c
const static Key : capsLock
const static Key : closeBracket
const Int : code
Key code
const static Key : comma
const static Key : ctrl
const static Key : d
const static Key : dash
const static Key : delete
const static Key : down
const static Key : e
const static Key : end
const static Key : enter
const static Key : equal
virtual Bool equals(Obj? that)
Equality is based on name.
const static Key : esc
const static Key : f
const static Key : f1
const static Key : f10
const static Key : f2
const static Key : f3
const static Key : f4
const static Key : f5
const static Key : f6
const static Key : f7
const static Key : f8
const static Key : f9
static Key fromCode(Int code)
Lookup by key code.
static new fromStr(Str s, Bool checked)
Lookup by string name or symbol
const static Key : g
const static Key : h
virtual Int hash()
Hash code is based on name.
const static Key : home
const static Key : i
const static Key : insert
Bool isModifier()
Is this one of the modifier keys alt, shift, ctrl, meta
const static Key : j
const static Key : k
const static Key : l
const static Key : left
const static Key : m
const static Key : meta
const static Key : n
const Str : name
Key name
const static Key : num0
const static Key : num1
const static Key : num2
const static Key : num3
const static Key : num4
const static Key : num5
const static Key : num6
const static Key : num7
const static Key : num8
const static Key : num9
const static Key : o
const static Key : openBracket
const static Key : p
const static Key : pageDown
const static Key : pageUp
const static Key : period
const static Key : q
const static Key : quote
const static Key : r
const static Key : right
const static Key : s
const static Key : semicolon
const static Key : shift
const static Key : slash
const static Key : space
const Str? : symbol
If this a char symbol such as OpenBracket this is its symbol "[". The arrow keys will return their respective Unicode arrow char.
const static Key : t
const static Key : tab
virtual Str toStr()
Return name.
const static Key : u
const static Key : up
const static Key : v
const static Key : w
const static Key : x
const static Key : y
const static Key : z