Go to: Synopsis. Return value. Related. Flags. MEL examples.
hotkeySet [-current] [-delete] [-exists] [-export string] [-hotkeySetArray] [-import string] [-rename string] [-source string]
[name]
hotkeySet is undoable, queryable, and editable.
Manages hotkey sets in Maya. A hotkey set holds hotkey to command mapping information.
Default hotkey sets are hotkey sets that are shipped together with Maya. They are locked and cannot be altered.
A new hotkey set is always duplicated from an existing hotkey set. In create mode, users can choose to specify
which hotkey set to duplicate by using the -source flag. A duplicated hotkey set is independent from the source
hotkey set.
string | The name of the hotkey set. |
In query mode, return type is based on queried flag.
hotkey, hotkeyCtx
current, delete, exists, export, hotkeySetArray, import, rename, source
Long name (short name) |
Argument types |
Properties |
|
-current(-cu)
|
|
|
|
Sets the hotkey set as the current active hotkey set. In query mode, returns the name of
the current hotkey set.
|
|
-delete(-del)
|
|
|
|
Deletes the hotkey set if it exists. Other flags are ignored.
Returns true|false depending on the delete operation.
|
|
-exists(-ex)
|
|
|
|
Returns true|false depending upon whether the specified object
exists. Other flags are ignored.
|
|
-export(-ep)
|
string
|
|
|
Exports a hotkey set. The argument is used to specify a full path of the output file.
|
|
-hotkeySetArray(-hsa)
|
|
|
|
Returns a string array of all existing hotkey set names.
|
|
-import(-ip)
|
string
|
|
|
Imports a hotkey set. The argument is used to specify a full path of the hotkey set file to import.
|
|
-rename(-re)
|
string
|
|
|
Renames an existing hotkey set. All white spaces will be replaced with '_' during operation.
|
|
-source(-src)
|
string
|
|
|
Specifies the source hotkey set. If flag is not provided, the current active hotkey set is used.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can be used more than once in a command.
|
// Create a new hotkey set and set it as the active hotkey set.
// The current active hotkey set is used as its source.
hotkeySet -current MyNewKeySet;
// Query the name of the current hotkey set
hotkeySet -q -current;
// Create a new hotkey set with a user hotkey set as source
hotkeySet -source "MyNewKeySet" MyNewKeySet2;
// Delete the created key set.
hotkeySet -edit -delete MyNewKeySet;
// Returns all available hotkey sets in Maya
hotkeySet -q -hotkeySetArray;
// Export a hotkey set
string $fileName = (`internalVar -userTmpDir` + "exportHotkeySet1.mhk");
hotkeySet -e -export $fileName MyNewKeySet2;
// Import a hotkey set
hotkeySet -e -import $fileName;