blockly > ShortcutRegistry > getShortcutNamesByKeyCode
ShortcutRegistry.getShortcutNamesByKeyCode() method
Gets the shortcuts registered to the given key code.
Signature:
getShortcutNamesByKeyCode(keyCode: string): string[] | undefined;
Parameters
Parameter |
Type |
Description |
keyCode |
string |
The serialized key code. |
Returns:
string[] | undefined
The list of shortcuts to call when the given keyCode is used. Undefined if no shortcuts exist.
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."],[[["`ShortcutRegistry.getShortcutNamesByKeyCode()` retrieves the names of shortcuts associated with a specific key code."],["It accepts a serialized key code as input and returns an array of shortcut names or undefined if none are found."],["This method helps identify which shortcuts are triggered by a particular key press within the Blockly environment."]]],[]]