Do you and how do you install global or editor specific hotkeys in Maya?

by vshotarov posted 1175 days ago | 1 comment

What I mean by global hotkeys is ones that get triggered no matter which window/layout/panel/editor of maya you are in at the moment. And by editor specific I mean ones that get triggered only inside of that editor. For example, how would you approach creating a hotkey that only runs when in the Script Editor?

I've been trying to figure out a way of doing this with just native Maya, but I haven't had any luck. The way I've done it for the few cases I've had to was using PySide, which definitely works, but it feels hacky as we are entirely hijacking the input.

An example of what I've used it for is Clear history when inside the Script Editor. I've bound it to Ctrl + H, while still maintaining the Hide functionality everywhere else.

Have you done this before and if so how did you approach it? I am really curious.

by elsonkms92 posted 1155 days ago

I am no maya nor mel expert but if you take a look at the hotkey Editor, you will find (for etc modelling Panel-displaywireframe) under command, there is a bunch of codes there that will activate whenever you execute the hotkey. One way of doing it is to edit the command and add a command that list and get all panels. This will get all panels then execute the command which is the "global" way you wanted. Of course, i may be wrong so maybe we can wait for a expert to drop by? XD