On 14/05/2017 at 09:00, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
I was playing around with shortcut keys, and wrote the following to detect the used shortcut key for a given plugin.
Int32 nbr = 10;
Int32 *idxarray = NewMemClear(Int32, nbr);
Int32 ret = FindShortcutsFromID(MY_PLUGIN_ID, idxarray, nbr);
for (Int32 i = 0; i < ret; i++)
{
BaseContainer bc = GetShortcut(idxarray[i]);
Int32 pluginID = bc.GetInt32(SHORTCUT_PLUGINID);
Int32 managerID = bc.GetInt32(SHORTCUT_ADDRESS);
Bool shortcutOptionMode = bc.GetBool(SHORTCUT_OPTIONMODE);
Int32 shortcutQualifier = bc.GetInt32(0);
Int32 shortcutKey = bc.GetInt32(1);
}
DeleteMem(idxarray);
But what about multi key shortcuts (example Q~E), only the first key can be obtained with above code. What if I have multiple commands, all assigned multi keys (Q~A, Q~E, Q~R, ...), how to know their "full" shortcut, since the above code will only return "Q" for all of them?