Hi,
as @C4DS said, the easiest way of doing it would be to create script or CommandData to launch your main commandData.
Using commandData would allow you to hide them from the extension menu and still being able to assign shortcut on them.
You could also assign different shortcut and check which one has called your plugin.
You could find the shortcut list assign to your command and react to them by order. First one will trigger this option, second that, etc.
The issue is that you must rely on the shortcut order.
def Execute(self, doc):
# retrieve the shortcut list
for x in range(c4d.gui.GetShortcutCount()):
shortcutBc = c4d.gui.GetShortcut(x)
# you have to check the combinaison, that could be a bit hard because shortcut can have up to 4 keys and modifier.
if shortcutBc[1000] == PLUGIN_ID:
for data in shortcutBc:
print (data)
# Check for specific key pressed
bc = c4d.BaseContainer()
# user ord('E') or 69 for the e key. do not use ord('e')
if c4d.gui.GetInputState(c4d.BFM_INPUT_KEYBOARD, ord('E'), bc):
if bc[c4d.BFM_INPUT_VALUE] == 1:
print ("option 1")
else:
print ("e NOT PRESSED")
Cheers,
Manuel