Fantom

 

const class

fwt::Key

sys::Obj
  fwt::Key

@simple
@js

Key models a keyboard key or key combination.

Slots

aSource

static Key a

altSource

static Key alt

bSource

static Key b

backspaceSource

static Key backspace

cSource

static Key c

capsLockSource

static Key capsLock

commandSource

static Key command

ctrlSource

static Key ctrl

dSource

static Key d

deleteSource

static Key delete

downSource

static Key down

eSource

static Key e

endSource

static Key end

enterSource

static Key enter

equalsSource

override Bool equals(Obj? that)

Overrides sys::Obj.equals

Equality is based on keycode.

escSource

static Key esc

fSource

static Key f

f1Source

static Key f1

f10Source

static Key f10

f11Source

static Key f11

f12Source

static Key f12

f2Source

static Key f2

f3Source

static Key f3

f4Source

static Key f4

f5Source

static Key f5

f6Source

static Key f6

f7Source

static Key f7

f8Source

static Key f8

f9Source

static Key f9

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

static Key g

hSource

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

static Key home

iSource

static Key i

insertSource

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

Bool isDown(Key modifier)

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

static Key j

kSource

static Key k

keypad0Source

static Key keypad0

keypad1Source

static Key keypad1

keypad2Source

static Key keypad2

keypad3Source

static Key keypad3

keypad4Source

static Key keypad4

keypad5Source

static Key keypad5

keypad6Source

static Key keypad6

keypad7Source

static Key keypad7

keypad8Source

static Key keypad8

keypad9Source

static Key keypad9

keypadDivSource

static Key keypadDiv

keypadDotSource

static Key keypadDot

keypadEnterSource

static Key keypadEnter

keypadEqualSource

static Key keypadEqual

keypadMinusSource

static Key keypadMinus

keypadMultSource

static Key keypadMult

keypadPlusSource

static Key keypadPlus

lSource

static Key l

leftSource

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

static Key m

modifiersSource

Key modifiers()

Return a Key instance with only the modifiers.

nSource

static Key n

num0Source

static Key num0

num1Source

static Key num1

num2Source

static Key num2

num3Source

static Key num3

num4Source

static Key num4

num5Source

static Key num5

num6Source

static Key num6

num7Source

static Key num7

num8Source

static Key num8

num9Source

static Key num9

numLockSource

static Key numLock

oSource

static Key o

pSource

static Key p

pageDownSource

static Key pageDown

pageUpSource

static Key pageUp

pauseSource

static Key pause

plusSource

Key plus(Key x)

Add two keys to create a new key combination. Throws ArgErr if neither this nor x returns true true for isModifier.

printScreenSource

static Key printScreen

qSource

static Key q

rSource

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.

static Key right

sSource

static Key s

scrollLockSource

static Key scrollLock

shiftSource

static Key shift

spaceSource

static Key space

tSource

static Key t

tabSource

static Key tab

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Format as key names combined with "+" symbol.

uSource

static Key u

upSource

static Key up

vSource

static Key v

wSource

static Key w

xSource

static Key x

ySource

static Key y

zSource

static Key z