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.