Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

hotkeyCtx [-addClient string] [-clientArray] [-currentClient string] [-insertTypeAt string string] [-removeAllClients] [-removeClient string] [-removeType string] [-type string] [-typeArray] [-typeExists string]

hotkeyCtx is undoable, queryable, and NOT editable.

This command sets the hotkey context for the entire application.

Return value

None

In query mode, return type is based on queried flag.

Related

hotkey, hotkeySet

Flags

addClient, clientArray, currentClient, insertTypeAt, removeAllClients, removeClient, removeType, type, typeArray, typeExists
Long name (short name) Argument types Properties
-addClient(-ac) string createmultiuse
Associates a client to the given hotkey context type. This flag needs to be used with the flag "type" which specifies the context type.
-clientArray(-ca) query
Returns an array of the all context clients associated to the hotkey context type. This flag needs to be used with the flag "type" which specifies the context type.
-currentClient(-cc) string createquery
Current client for the given hotkey context type. This flag needs to be used with the flag "type" which specifies the context type.
-insertTypeAt(-ita) string string create
Inserts a new hotkey context type in the front of the given type. The first argument specifies an existing type. If it's empty, the new context type will be inserted before "Global" context type. The second argument specifies the name of new context type.
-removeAllClients(-rac) create
Removes all the clients associated to the hotkey context type. This flag needs to be used with the flag "type" which specifies the context type.
-removeClient(-rc) string createmultiuse
Removes a client associated to the hotkey context type. This flag needs to be used with the flag "type" which specifies the context type.
-removeType(-rt) string create
Removes the given hotkey context type.
-type(-t) string createquery
Specifies the context type. It's used together with the other flags such as "currentClient", "addClient", "removeClient" and so on.
-typeArray(-ta) query
Returns a string array containing the names of all hotkey context types, ordered by priority.
-typeExists(-te) string query
Returns true|false depending upon whether the specified hotkey context type exists.

In query mode, this flag needs a value.


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.

MEL examples

// Here are some examples of how to use hotkeyCtx command.
//

// Create a user hotkey set.
hotkeySet -current MyNewKeyMapSet;

// Create a new context type
hotkeyCtx -insertTypeAt "Global" "CustomEditor";
hotkeyCtx -insertTypeAt "CustomEditor" "CustomTool";

// Query all existing context types
string $ctxTypes[] = `hotkeyCtx -query -typeArray`;
print $ctxTypes;

// Remove an existing context type
hotkeyCtx -removeType "CustomTool";

// Determine if the given context type exists
hotkeyCtx -q -te "CustomTool";

// Associate the clients to the specific context type.
hotkeyCtx -t "CustomEditor" -ac "outlinerPanel" -ac "hyperGraphPanel";

// Set current context
hotkeyCtx -t "CustomEditor" -cc "hyperGraphPanel";

// Unassign the client from the specific context type.
hotkeyCtx -t "CustomEditor" -rc "outlinerPanel";

// Query all associated clients for the given context type.
string $cl[] = `hotkeyCtx -q -t "CustomEditor" -ca`;
print $cl;

// Remove all associated clients
hotkeyCtx -t "CustomEditor" -rac;