Easily create custom hotkey.
Benoit GIELLY <firstname.lastname@example.org>
create_hotkey(name, command, keys, edit=False, annotation='New user script', category='custom', language='python')¶
Create a user hotkey with its namedCommand.
name (str) – Name of the command to attach to a hotkey
command (str) – The command to run. Must be an executable string.
keys (str) – The hotkey to use. If you want modifiers, add them before the keyboard key and separate them with “+”. Eg. “alt+shift+A”.
edit (bool) – If a command already exists and you want to update it.
annotation (str) – Add an annotation to the command/hotkey
category (str) – The category in which you add the command. Default is “Custom Scripts.custom”
language (str) – The source language used by the command. Must be either “mel” or “python”
Quickly re-create custom hotkeys from a yaml file.
Make sure the current hotkey set is valid.