keys#

Interfaces#

KeyContext#

Defined in: arranger/src/keys.ts:69

What a key acts on and through: the canvas at the moment the key is pressed.

Properties#

editing#

readonly editing: Editing | null

Defined in: arranger/src/keys.ts:72

editors#

readonly editors: number

Defined in: arranger/src/keys.ts:88

How many editors are open: Escape closes the innermost.

gapEdge#

readonly gapEdge: GapEdge

Defined in: arranger/src/keys.ts:85

The edge of a selected elision the arrows move: [ chooses the start, ] the end.

gapModes#

readonly gapModes: GapModes

Defined in: arranger/src/keys.ts:81

What a selected elision’s handles and arrows change (the gap mode menu’s toggles).

granularity#

readonly granularity: Granularity

Defined in: arranger/src/keys.ts:79

How finely a key moving an elision’s edge picks its value: the canvas’s granularity.

metrics#

readonly metrics: FontMetrics

Defined in: arranger/src/keys.ts:75

pane#

readonly pane: PaneSource | undefined

Defined in: arranger/src/keys.ts:77

The pane the canvas’s drawings are fitted to (Pane.view).

rules#

readonly rules: LevelRules

Defined in: arranger/src/keys.ts:74

The canvas’s rules now (rulesOf).

selection#

readonly selection: Selection

Defined in: arranger/src/keys.ts:71

view#

readonly view: View

Defined in: arranger/src/keys.ts:70

Methods#

abortGesture()#

abortGesture(): boolean

Defined in: arranger/src/keys.ts:108

Ends a gesture in progress (GestureSlot.abort); whether there was one.

Returns#

boolean

chooseGapEdge()#

chooseGapEdge(edge): void

Defined in: arranger/src/keys.ts:86

Parameters#
edge#

GapEdge

Returns#

void

confirmDelete()#

confirmDelete(question): Promise<SetCommand | RemoveCommand | StyleCommand | null>

Defined in: arranger/src/keys.ts:95

Asks what a deletion taking virtual timelines along does (deleteQuestion): the command chosen, or null.

Parameters#
question#

DeleteQuestion

Returns#

Promise<SetCommand | RemoveCommand | StyleCommand | null>

dispatch()#

dispatch(command): boolean

Defined in: arranger/src/keys.ts:91

Runs a command; whether the store accepted it (a refusal is reported to the canvas’s host).

Parameters#
command#

Command

Returns#

boolean

done()#

done(): void

Defined in: arranger/src/keys.ts:110

Closes the innermost editor.

Returns#

void

fit()#

fit(): void

Defined in: arranger/src/keys.ts:106

Returns#

void

open()#

open(target): void

Defined in: arranger/src/keys.ts:112

Opens the editor of target.

Parameters#
target#

Address

Returns#

void

openable()#

openable(): Address | null

Defined in: arranger/src/keys.ts:114

The editor Enter opens (openable); null when the selection opens none.

Returns#

Address | null

pressed()#

pressed(): Selection | null

Defined in: arranger/src/keys.ts:116

What a press on the focused element (the key’s target) selects, as a click would.

Returns#

Selection | null

refuse()#

refuse(message): void

Defined in: arranger/src/keys.ts:93

Reports a refusal that no command produced to the canvas’s host.

Parameters#
message#

string

Returns#

void

select()#

select(next): void

Defined in: arranger/src/keys.ts:89

Parameters#
next#

Selection

Returns#

void

setMode()#

setMode(mode): void

Defined in: arranger/src/keys.ts:98

Parameters#
mode#

ResizeMode

Returns#

void

toggleCoordinates()#

toggleCoordinates(): void

Defined in: arranger/src/keys.ts:101

Turns “Show coordinates” on or off.

Returns#

void

toggleGapMode()#

toggleGapMode(mode): void

Defined in: arranger/src/keys.ts:83

Presses or releases one of the gap modes; releasing the last pressed one does nothing.

Parameters#
mode#

keyof GapModes

Returns#

void

toggleLock()#

toggleLock(): void

Defined in: arranger/src/keys.ts:99

Returns#

void

toggleMatches()#

toggleMatches(): void

Defined in: arranger/src/keys.ts:103

Turns “Show matches” on or off.

Returns#

void

zoomIn()#

zoomIn(): void

Defined in: arranger/src/keys.ts:104

Returns#

void

zoomOut()#

zoomOut(): void

Defined in: arranger/src/keys.ts:105

Returns#

void


KeyRow#

Defined in: arranger/src/keys.ts:120

One row of the key table.

Methods#

match()#

match(event): boolean

Defined in: arranger/src/keys.ts:121

Parameters#
event#

KeyboardEvent

Returns#

boolean

run()#

run(context, event): boolean

Defined in: arranger/src/keys.ts:123

Act; whether the key was the canvas’s (it is then taken from the page).

Parameters#
context#

KeyContext

event#

KeyboardEvent

Returns#

boolean

Variables#

KEYS#

const KEYS: readonly KeyRow[]

Defined in: arranger/src/keys.ts:302

The key table, in the order the rows are read.


LARGE_STEP#

const LARGE_STEP: 8 = 8

Defined in: arranger/src/keys.ts:66

Arrow keys move by one grid step; with Shift by this many.

Functions#

arrangedStep()#

arrangedStep(arranged, key): number

Defined in: arranger/src/keys.ts:215

How many places an arrow moves a content of an arrangement: along it, Up and Down one place in a column, Left and Right in a row, and in a matrix Left and Right one place in its row, Up and Down one row (the number of columns); 0 for an arrow across a column or a row.

Parameters#

arranged#

Arranged

key#

string

Returns#

number


handleKey()#

handleKey(context, event): boolean

Defined in: arranger/src/keys.ts:487

Run the row a key matches; false when the key means nothing on the canvas.

Parameters#

context#

KeyContext

event#

KeyboardEvent

Returns#

boolean


inToolbar()#

inToolbar(event): boolean

Defined in: arranger/src/keys.ts:509

Whether arrows, Home and End belong to a toolbar the target lies in, moving between its buttons.

Parameters#

event#

KeyboardEvent

Returns#

boolean


isTextInput()#

isTextInput(target): boolean

Defined in: arranger/src/keys.ts:493

Whether target takes typed text: a text field, a list box or an editable element.

Parameters#

target#

EventTarget | null

Returns#

boolean


within()#

within(root, target): boolean

Defined in: arranger/src/keys.ts:504

Whether target lies in root (or is it).

Parameters#

root#

Element | undefined

target#

EventTarget | null

Returns#

boolean