blockly > ShortcutRegistry > setKeyMap
ShortcutRegistry.setKeyMap() method
Sets the key map. Setting the key map will override any default key mappings.
Signature:
setKeyMap(newKeyMap: {
[key: string]: string[];
}): void;
Parameters
Parameter |
Type |
Description |
newKeyMap |
{ [key: string]: string[]; } |
The object with key code to shortcut names. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `setKeyMap` method allows customization of keyboard shortcuts by overriding default mappings with a new key map."],["The `newKeyMap` parameter accepts an object where keys represent key codes and values are arrays of corresponding shortcut names."],["Utilizing `setKeyMap` provides developers with control over keyboard interactions within the Blockly environment, enabling tailored shortcut functionalities."]]],[]]