Maya 2016 - handling hotkeys

Attempting to update a tool that had custom hotkeys on “b” and “m”, now outdated in Maya 2016.
Originally, the tool created hotkeys on entering a context and restoring the previous hotkeys on exitting context.
In 2016 there are a few new hotkey concepts;

  • hotkeySet: There’s “Maya_Default” set which isn’t writeable,
    [INDENT]and “Maya_Default_Dulplicate” which is writable,
    other sets can be created via user or script.
    Sets other than the default are only overrides from the default.<- I think
    The active set is configured by user or script.
    [/INDENT]
  • hotkeyCtx: By default there’s types; “Tool”, “Editor”, and “Global”, others can be created.
    [INDENT]For each type there’s client’s, “polySculptingTool” or similar.
    The current hotkeyCtx is set by script.[/INDENT]
  • hotkey: -ctxClient is a arg that can be set when creating a hotkey defining a hotkey client in which this hotkey applies.

What I’ve tried is on context enter check that the current hotkeySet is writable,
if so create a new hotkeyCtx type “Tool” client “foobar” if it doesn’t exist,
switch the current hotkeyCtx to “foobar”,
create a hotkey with the -keyShortcut “b” -ctxClient “foobar” if it doesn’t exist.

The hot key works for the tool but afterwards other tools that use the same buttons don’t work.
I can’t tell why, maybe the existing tools like vertex color painting, paint vert weights, etc don’t use the new system?
Am I using this the intended way or leaving a step out?
Or is Autodesk half assing it.