Content dependant hotkeys?

Hello,
Is there a way to create a hotkey, that launches one function if SW is in one state and anoter, if SW is in another state?
For exampe: I press Ctrl+E and SW launches Cut-Extrude, but if I'm in a Sketch mode, it would launch TrimEntities.

3 Answers

Hope I helped.

Answered with a tutorial: https://grabcad.com/tutorials/content-dependant-hotkeys

The answer above is correct and I have used this technique, but the task you want to perform is already available by using the "s" key shortcut to bring up the customizable quick commands box.

Not quite what I was searching for.
I want the hotkeys to be context sensitive, not only toolbars.