CommandFunc: function
Dataset: object
_command
Changed
: Signal<this, ICommandChangedArgs> = new Signal<this, CommandRegistry.ICommandChangedArgs>(this)_command
Executed
: Signal<this, ICommandExecutedArgs> = new Signal<this, CommandRegistry.ICommandExecutedArgs>(this)_commands: object = Object.create(null)
_key
Binding
Changed
: Signal<this, IKeyBindingChangedArgs> = new Signal<this, CommandRegistry.IKeyBindingChangedArgs>(this)_keydownEvents: KeyboardEvent[] = []
_keystrokes: string[] = []
_replaying: boolean = false
_timerID: number = 0
A disposable which will remove the command.
A disposable which removes the added key binding.
NotesIf multiple key bindings are registered for the same sequence, the binding with the highest selector specificity is executed first. A tie is broken by using the most recently added key binding.
Ambiguous key bindings are resolved with a timeout. As an example, suppose two key bindings are registered: one with the key sequence ['Ctrl D']
, and another with ['Ctrl D', 'Ctrl W']
. If the user presses Ctrl D
, the first binding cannot be immediately executed since the user may intend to complete the chord with Ctrl W
. For such cases, a timer is used to allow the chord to be completed. If the chord is not completed before the timeout, the first binding is executed.
The caption for the command, or an empty string if the command is not registered.
The class name for the command, or an empty string if the command is not registered.
The dataset for the command, or an empty dataset if the command is not registered.
A promise which resolves with the result of the command.
NotesThe promise will reject if the command throws an exception, or if the command is not registered.
true
if the command is registered, false
otherwise.
The icon class for the command, or an empty string if the command is not registered.
The icon label for the command, or an empty string if the command is not registered.
A boolean indicating whether the command is enabled, or false
if the command is not registered.
A boolean indicating whether the command is toggled, or false
if the command is not registered.
A boolean indicating whether the command is visible, or false
if the command is not registered.
The display label for the command, or an empty string if the command is not registered.
A new array of the registered command ids.
The mnemonic index for the command, or -1
if the command is not registered.
The usage text for the command, or an empty string if the command is not registered.
A normalized keystroke, or an empty string if the event does not represent a valid keystroke for the given layout.
The normalized representation of the keystroke.
NotesThis normalizes the keystroke by removing duplicate modifiers and extra primary keys, and assembling the parts in a canonical order.
The Cmd
modifier is ignored on non-Mac platforms.
The parsed components of the keystroke.
NotesThe keystroke should be of the form: [<modifier 1> [<modifier 2> [<modifier N> ]]]<primary key>
The supported modifiers are: Accel
, Alt
, Cmd
, Ctrl
, and Shift
. The Accel
modifier is translated to Cmd
on Mac and Ctrl
on all other platforms.
The parsing is tolerant and will not throw exceptions. Notably:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4