@Js
@Serializable {
simple=true
collection=false
}
Key models a keyboard key or key combination.
Slots
- aSource
-
const static Key a
- altSource
-
const static Key alt
- bSource
-
const static Key b
- backspaceSource
-
const static Key backspace
- cSource
-
const static Key c
- capsLockSource
-
const static Key capsLock
- commandSource
-
const static Key command
- ctrlSource
-
const static Key ctrl
- dSource
-
const static Key d
- deleteSource
-
const static Key delete
- downSource
-
const static Key down
- eSource
-
const static Key e
- endSource
-
const static Key end
- enterSource
-
const static Key enter
- equalsSource
-
override Bool equals(Obj? that)
Overrides sys::Obj.equals
Equality is based on keycode.
- escSource
-
const static Key esc
- fSource
-
const static Key f
- f1Source
-
const static Key f1
- f10Source
-
const static Key f10
- f11Source
-
const static Key f11
- f12Source
-
const static Key f12
- f2Source
-
const static Key f2
- f3Source
-
const static Key f3
- f4Source
-
const static Key f4
- f5Source
-
const static Key f5
- f6Source
-
const static Key f6
- f7Source
-
const static Key f7
- f8Source
-
const static Key f8
- f9Source
-
const static Key f9
-
static internal Key fromMask(Int mask)
Iternal lookup by mask: we either return a predefined instance or create a new one just in case we don't have a predefined instance defined.
- fromStrSource
-
static Key? fromStr(Str s, Bool checked := true)
Parse font from string (see toStr). If invalid and checked is true then throw ParseErr otherwise return null.
- gSource
-
const static Key g
- hSource
-
const static Key h
- hasModifierSource
-
Bool hasModifier()
Return if any of the modifier keys are down.
- hashSource
-
override Int hash()
Overrides sys::Obj.hash
Hash code is based on keycode.
- homeSource
-
const static Key home
- iSource
-
const static Key i
- insertSource
-
const static Key insert
- isAltSource
-
Bool isAlt()
Convenience for
isDown(alt)
- isCommandSource
-
Bool isCommand()
Convenience for
isDown(comand)
- isCtrlSource
-
Bool isCtrl()
Convenience for
isDown(ctrl)
- isDownSource
-
Return if the specified modifier is down.
- isModifierSource
-
Bool isModifier()
Is this instance is a modifier which may be combined with other keys: shift, alt, ctrl, command.
- isShiftSource
-
Bool isShift()
Convenience for
isDown(shift)
- jSource
-
const static Key j
- kSource
-
const static Key k
- keypad0Source
-
const static Key keypad0
- keypad1Source
-
const static Key keypad1
- keypad2Source
-
const static Key keypad2
- keypad3Source
-
const static Key keypad3
- keypad4Source
-
const static Key keypad4
- keypad5Source
-
const static Key keypad5
- keypad6Source
-
const static Key keypad6
- keypad7Source
-
const static Key keypad7
- keypad8Source
-
const static Key keypad8
- keypad9Source
-
const static Key keypad9
- keypadDivSource
-
const static Key keypadDiv
- keypadDotSource
-
const static Key keypadDot
- keypadEnterSource
-
const static Key keypadEnter
- keypadEqualSource
-
const static Key keypadEqual
- keypadMinusSource
-
const static Key keypadMinus
- keypadMultSource
-
const static Key keypadMult
- keypadPlusSource
-
const static Key keypadPlus
- lSource
-
const static Key l
- leftSource
-
const static Key left
- listSource
-
Key[] list()
Decompose a key combination into its individual keys. If instance isn't a combination then return a list with one item (this instance).
- mSource
-
const static Key m
-
new makeNew(Int mask, Str? str)
Private constructor
-
const internal Int mask
Internal mask is based on SWT mask values
-
const static private Int modifierMask := ...
-
const static private Int modifierUnmask := @modifierMask.not
- modifiersSource
-
Key modifiers()
Return a Key instance with only the modifiers.
- nSource
-
const static Key n
-
const static private Key none
- num0Source
-
const static Key num0
- num1Source
-
const static Key num1
- num2Source
-
const static Key num2
- num3Source
-
const static Key num3
- num4Source
-
const static Key num4
- num5Source
-
const static Key num5
- num6Source
-
const static Key num6
- num7Source
-
const static Key num7
- num8Source
-
const static Key num8
- num9Source
-
const static Key num9
- numLockSource
-
const static Key numLock
- oSource
-
const static Key o
- pSource
-
const static Key p
- pageDownSource
-
const static Key pageDown
- pageUpSource
-
const static Key pageUp
- pauseSource
-
const static Key pause
- plusSource
-
Add two keys to create a new key combination. Throws ArgErr if neither this nor x returns true true for isModifier.
- printScreenSource
-
const static Key printScreen
- qSource
-
const static Key q
- rSource
-
const static Key r
- replaceSource
-
Key replace(Key modFrom, Key modTo)
Replace one modifier with another modifer. If modFrom is not defined in this key, then return this.
- rightSource
-
const static Key right
- sSource
-
const static Key s
- scrollLockSource
-
const static Key scrollLock
- shiftSource
-
const static Key shift
- spaceSource
-
const static Key space
-
const internal Str? str
String encoding (if null we have to calcualte in toStr)
- tSource
-
const static Key t
- tabSource
-
const static Key tab
- toStrSource
-
override Str toStr()
Overrides sys::Obj.toStr
Format as key names combined with "+" symbol.
- uSource
-
const static Key u
- upSource
-
const static Key up
- vSource
-
const static Key v
- wSource
-
const static Key w
- xSource
-
const static Key x
- ySource
-
const static Key y
- zSource
-
const static Key z