blockly > Champ > onShortcut
Méthode Field.onShortcut()
Gère le raccourci clavier donné.
Signature :
onShortcut(_shortcut: KeyboardShortcut): boolean;
Paramètres
Paramètre |
Type |
Description |
_raccourci |
KeyboardShortcut |
Raccourci à gérer. |
Renvoie :
booléen
"True" si le raccourci a été géré, sinon "false".
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/10/11 (UTC).
[null,null,["Dernière mise à jour le 2024/10/11 (UTC)."],[[["The `onShortcut` method in Blockly's Field class determines how a field responds to a specific keyboard shortcut."],["It takes a `KeyboardShortcut` object as input, representing the triggered shortcut."],["If the method successfully processes the shortcut, it returns `true`; otherwise, it returns `false`."]]],["The `onShortcut` method, part of the `Field` class, processes keyboard shortcuts. It accepts a `KeyboardShortcut` as input. The method's core function is to determine if a given shortcut is relevant to a particular field. It returns a boolean value: `true` if the shortcut was handled by the field, and `false` if the shortcut was not handled, implying that other parts of the program can potentially handle it.\n"]]