// Edit 2/20/2022: First of all I just want to say that I still havent found a solution as of now! So more answers are needed.
So as by @pyCod3R 's example. If I were to replace the line bl_idname = "object.simple_operator"
with bl_idname = "fast_pbr.simple_operator"
. Again the issue appears in his example as well.
As my addon is somewhat large (Close to 20 operators total), I want them all to fit under the same roof, so if possible I would rather like to avoid registering them under simply "object".
So I guess the question has now changed to:
How do I enable the "Assign shortcut" button in RMB for operators registered with a custom namespace of my own? Do I need to "register" the namespace itself somewhere?
// End of edit
So Ive noticed that the popup menu which appears when right clicking any of the operators registered to the UI in my addon is missing the "Assign shortcut" button. I can still go into the keymaps preferences and add an entry there manually. I can also just add a hotkey using bpy using something like:
keyConfig.keymaps["Window"].keymap_items.new("fast_pbr.fast_upbge_pie", type="NONE", value="PRESS")
Where setting the type (which determines which key is assigned to the keymap entry we are adding) to NONE one would imagine the "Assign shortcut" thing to appear in the RMB menu, of which it does not (setting it to "NONE" results in no change to the RMB menu, setting it to anything but "NONE" results in "Change shortcut" to appear in the menu, but then we are assigning a shortcut, which in my case is undesired as I just want to make it easy for the users to assign a shortcut without actually holding any keys hostage by default).
Does anyone know how to get this "Assign Shortcut" button to appear for operators that I register myself as a part of my addon?
Thanks for reading 💝