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#
readonlyediting:Editing|null
Defined in: arranger/src/keys.ts:72
editors#
readonlyeditors:number
Defined in: arranger/src/keys.ts:88
How many editors are open: Escape closes the innermost.
gapEdge#
readonlygapEdge:GapEdge
Defined in: arranger/src/keys.ts:85
The edge of a selected elision the arrows move: [ chooses the start, ] the end.
gapModes#
readonlygapModes:GapModes
Defined in: arranger/src/keys.ts:81
What a selected elision’s handles and arrows change (the gap mode menu’s toggles).
granularity#
readonlygranularity: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#
readonlymetrics:FontMetrics
Defined in: arranger/src/keys.ts:75
pane#
readonlypane:PaneSource|undefined
Defined in: arranger/src/keys.ts:77
The pane the canvas’s drawings are fitted to (Pane.view).
rules#
readonlyrules:LevelRules
Defined in: arranger/src/keys.ts:74
The canvas’s rules now (rulesOf).
selection#
readonlyselection:Selection
Defined in: arranger/src/keys.ts:71
view#
readonlyview: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#
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#
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#
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#
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#
Returns#
void
setMode()#
setMode(
mode):void
Defined in: arranger/src/keys.ts:98
Parameters#
mode#
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#
event#
KeyboardEvent
Returns#
boolean
Variables#
KEYS#
constKEYS: readonlyKeyRow[]
Defined in: arranger/src/keys.ts:302
The key table, in the order the rows are read.
LARGE_STEP#
constLARGE_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#
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#
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