Skip to Content

@stesura/core/keymap

stesuraKeymap(schema) is ProseMirror’s baseKeymap with these bindings added or overridden (Mod is Cmd on macOS, Ctrl elsewhere):

KeyBinding
EnterOpens a selected equation’s editor; otherwise a newline in code, outdent or un-number an empty list item, or split the block (applying the style’s next style at its end)
F2Opens a selected equation’s editor
Tab / Shift-TabNext / previous table cell (Tab in the last cell appends a row); outside tables, indent / outdent
BackspaceSelects an equation before deleting it; at the start of a line, outdents an unnumbered block or removes a list item’s numbering
DeleteJoins into or removes a code block from its end; removes a fully selected table
ArrowLeftMoves the caret out of a selected numbering counter
ArrowUpStops the caret at the top of a section’s content instead of entering its hidden header; in later sections, jumps to the end of the previous one
Mod-b / Mod-i / Mod-uToggle bold / italic / underline
Mod-Shift-cToggle code
Mod-Shift-sToggle strikethrough
Mod-Shift-= / Mod-=Toggle superscript / subscript
Mod-zundo
Mod-Shift-z / Mod-yredo
Mod-aSelect all within the part holding the caret (content, header or footer)
EscapeDisarms the format painter, otherwise closes search
Mod-fOpens search
Mod-> / Mod-<incrementFontSize("up") / incrementFontSize("down")
Mod-EnterInserts a paragraph after the table when inside one, otherwise a page break
Mod-l / Mod-e / Mod-r / Mod-jsetTextAlign "start" / "center" / "end" / "justify"
Alt-tinsertTable({ rows: 3, cols: 3 })
Mod-ksetPendingLink
Mod-Shift-xtoggleDirection
Shift-F3cycleCase

Functions & values

stesuraKeymap

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
Record<string, Command>

stesuraKeymapPlugin

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
Plugin<any>
Last updated on