Skip to main content

Home > 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

ParameterTypeDescription
keyCodenumberNumber code representing the key.
modifiersKeyCodes[] | nullList 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.