ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.
hotkey [-altModifier] [-autoSave boolean] [-commandModifier] [-ctrlModifier] [-ctxClient string] [-dragPress boolean] [-factorySettings] [-isModifier] [-keyShortcut string] [-name string] [-pressCommandRepeat boolean] [-releaseCommandRepeat boolean] [-releaseName string] [-shiftModifier] [-sourceUserHotkeys]
hotkey は、取り消し可能、照会可能、および編集不可能です。
このコマンドは、アプリケーション全体用の単一キーのホットキーを設定します。なし
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
-altModifier(-alt)
|
|
|||
|
||||
-autoSave(-as)
|
boolean
|
|||
|
||||
-commandModifier(-cmd)
|
|
|||
|
||||
-ctrlModifier(-ctl)
|
|
|||
|
||||
-ctxClient(-cc)
|
string
|
|||
|
||||
-dragPress(-dp)
|
boolean
|
|||
|
||||
-factorySettings(-fs)
|
|
|||
|
||||
-isModifier(-mod)
|
|
|||
|
||||
-keyShortcut(-k)
|
string
|
|||
|
||||
-name(-n)
|
string
|
|||
|
||||
-pressCommandRepeat(-pcr)
|
boolean
|
|||
|
||||
-releaseCommandRepeat(-rcr)
|
boolean
|
|||
|
||||
-releaseName(-rn)
|
string
|
|||
|
||||
-shiftModifier(-sht)
|
|
|||
|
||||
-sourceUserHotkeys(-suh)
|
|
|||
|
フラグはコマンドの作成モードで表示できます | フラグはコマンドの編集モードで表示できます |
フラグはコマンドの照会モードで表示できます | コマンド内でフラグを複数回使用できます。 |
// Here's an example of how to create a namedCommand // object and then map it to a key. // nameCommand -annotation "Select Circle Tool" -command "setToolTo circleContext" circleToolNamedCommand; hotkey -k "F5" -alt -name "circleToolNamedCommand"; // Here are more examples of how to use the hotkey command. // hotkey -k "d" -name "Delete_Command"; hotkey -k "d" -name ""; // unsets the above command hotkey -k "d" -name "Delete_Command"; hotkey -k "d" -releaseName "After_Delete_Command"; hotkey -k "d" -name ""; //only unsets the key press name hotkey -k "d" -releaseName ""; //only unsets the key release name hotkey -k "d" -n "" -rn ""; //unsets both the key press and release name // Determine if a command is attached to either the press or release // of the "z" hotkey. // hotkey -query z; // Likewise, for the modified variations of the "z" key. // hotkey -query -alt z; hotkey -query -ctl z; hotkey -query -alt -ctl z; // Determine the press command attached to the "z" key. // hotkey -query -name z; // To query the "-" hotkey use the string "Dash" instead. // hotkey -query Dash; // Here's an example of how to create runtimeCommand with a certain hotkey context, // and map it to a key. // // Create a command with "paintEffects" hotkey context. // runTimeCommand -annotation "Modify the Brush Size for the Paint Effects Tool" -category "Paint Effects" -commandLanguage "mel" -command ("dynWireCtx -e -dbs \"width\" `currentCtx`;") -hotkeyCtx ("paintEffects") ModifyBrushSize; nameCommand -annotation "ModifyBrushSizeNameCommand" -sourceType "mel" -command ("ModifyBrushSize") ModifyBrushSizeNameCommand; // Assign the paintEffects as a hotkey context client. // hotkeyCtx -type "Tool" -addClient "paintEffects"; // Map a key to the newly created command. // When the Paint Effects Tool is activated, the b key will work within this tool and // override editor and application-wide contexts. hotkey -keyShortcut "b" -name "ModifyBrushSizeNameCommand"; // Determine the press command attached to the "b" key within the tool's context. // hotkey -query -ctxClient "paintEffects" -name b; // Unset the key press name within the tool's context // hotkey -k "b" -name "" -ctxClient "paintEffects";