Class for the registry of keyboard shortcuts. This is intended to be a singleton. You should not create a new instance, and only access this class from Blockly.ShortcutRegistry.registry.
Adds a mapping between a keycode and a keyboard shortcut.
The key code for the keyboard shortcut. If registering a key code with a modifier (ex: ctrl+c) use Blockly.ShortcutRegistry.registry.createSerializedKey;
The name of the shortcut to execute when the given keycode is pressed.
Optionalopt_allowCollision: booleanTrue to prevent an error when adding a shortcut to a key that is already mapped to a shortcut.
Creates the serialized key code that will be used in the key map.
Number code representing the key.
List of modifier key codes to be used with the key. All valid modifiers can be found in the Blockly.ShortcutRegistry.modifierKeys.
The serialized key code for the given modifiers and key.
Gets the serialized key codes that the shortcut with the given name is registered under.
The name of the shortcut.
An array with all the key codes the shortcut is registered under.
Gets the current key map.
The object holding key codes to Blockly.ShortcutRegistry.KeyboardShortcut.
Gets the registry of keyboard shortcuts.
The registry of keyboard shortcuts.
Gets the shortcuts registered to the given key code.
The serialized key code.
The list of shortcuts to call when the given keyCode is used. Undefined if no shortcuts exist.
Registers a keyboard shortcut.
The shortcut for this key code.
Optionalopt_allowOverrides: booleanTrue to prevent a warning when overriding an already registered item.
Removes all the key mappings for a shortcut with the given name. Useful when changing the default key mappings and the key codes registered to the shortcut are unknown.
The name of the shortcut to remove from the key map.
Removes a mapping between a keycode and a keyboard shortcut.
The key code for the keyboard shortcut. If registering a key code with a modifier (ex: ctrl+c) use Blockly.ShortcutRegistry.registry.createSerializedKey;
The name of the shortcut to execute when the given keycode is pressed.
Optionalopt_quiet: booleanTrue to not console warn when there is no shortcut to remove.
True if a key mapping was removed, false otherwise.
Sets the key map. Setting the key map will override any default key mappings.
The object with key code to shortcut names.
Unregisters a keyboard shortcut registered with the given key code. This will also remove any key mappings that reference this shortcut.
The name of the shortcut to unregister.
True if an item was unregistered, false otherwise.
Fake class which should be extended to avoid inheriting static properties