Someone just asked here about adding a custom hotkey to an add-on that I made a some time ago. This add-on, for some reason, doesn't show any hotkey setup options when you right click on it like most operators show in Blender.
After doing some research, and looking through add-ons that I have made in the past, it appears that registering operators like...
bpy.utils.register_class(SomeClassName)
...doesn't allow the operator to have the hotkeys, but registering the entire module...
bpy.utils.register_module(__name__)
...does show the hotkey controls.
Is this intended behavior? Is there anything to do if you don't want to register the entire module like this?
Edit:
For the script that I linked to, simply registering the module instead of the operator class does not provide the user with the hotkey controls.
Here are some screenshots showing what I mean in case of any misunderstandings:
bpy.utils.register_module
makes the Add Shortcut button appear. Does not work for 2.79 addons API Navigator or Cloud Generator with prefixesapi_navigator.
andcloud.
. $\endgroup$bpy.utils.register_module
is defined in2.79\scripts\modules\bpy\utils
and does not seem to do anything with shortcuts. $\endgroup$