Make overrides the user's chords: every command it leaves out goes back
to its default, and each one it names moves (null unbinds). Written for a
saved record, so it reads anything: an entry that does not parse, is
reserved, or names a fixed binding is dropped, and one for a command
nothing registered yet is kept for when it does. Collisions a saved chord
makes are reported through onConflict, as a registration's are.
Listen on target in the capture phase, so a claimed chord never reaches
the engine's own listener on the document. Returns the detacher; a second
call replaces the first.
Hand the next key presses to fn ahead of every binding, for a control
that records a chord. Each press is prevented and stopped outright, so no
binding, no open dialog's Escape and no chart shortcut sees it, and
another keymap attached to the same node claims nothing meanwhile; fn
returns false to let one through (Tab moving the focus). Returns the
release. A second capture replaces the first.
Every collision in force: widget against widget, and widget against the engine's keymap.
The bindings that would compete with combo (key form) for a binding in
scope: widget bindings on it in that scope or one live at the same time
(global, widget and chart nest), and the engine's commands on it
unless the scope is rail or overlay. An unreadable chord has none.
The bindings as the shortcuts panel shows them: the widget's own groups, then the engine's chart commands, with any chord the widget claims first marked as shadowed. An engine command the user unbound stays listed, so it can be reset.
Resolve and run the binding for an event. True when a binding claimed it, in which case the event has been prevented and stopped.
Be told when the user's chords change: a rebind, a reset, or overrides applied.
Be told when a registration collides with an earlier one.
Move a command to another chord, or unbind it with null. A widget command
takes one chord in the key grammar; an engine command (chart:<command>)
one or several in the engine's code grammar, as eventToCombo gives
them. A chord the browser keeps is refused, and so is one another binding
holds, unless replace is set and every holder is rebindable: each then
gives the chord up and is left without it.
Bind a chord. Returns a disposer. Throws on a chord the grammar cannot read, or a command another live binding has, because a binding that can never fire or never be told apart is a defect at the call site, not at key time. A saved override for the command applies at once.
Put a command back on its default chord. The default may have been taken
meanwhile by a binding of the same kind (widget or chart); that is refused
as taken unless replace is set, as with rebind. A command nothing
registered yet just forgets its saved chord.
Whether a control is recording a chord right now.