Stay organized with collections
Save and categorize content based on your preferences.
blockly > ShortcutRegistry > createSerializedKey
ShortcutRegistry.createSerializedKey() method
Creates the serialized key code that will be used in the key map.
Signature:
createSerializedKey(keyCode: number, modifiers: KeyCodes[] | null): string;
Parameters
Parameter |
Type |
Description |
keyCode |
number |
Number code representing the key. |
modifiers |
KeyCodes[] | null |
List of modifier key codes to be used with the key. All valid modifiers can be found in the ShortcutRegistry.modifierKeys. |
Returns:
string
The serialized key code for the given modifiers and key.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `ShortcutRegistry.createSerializedKey()` method generates a serialized key code for key mapping, using a key code and optional modifier keys."],["It accepts the key code as a number and an optional array of modifier key codes, returning the serialized key code as a string."],["The serialized key code combines the key code with its modifiers for efficient storage and lookup in the key map."]]],[]]