To add a hotkey to a new tool you use this snippet here:
# handle the keymap
wm = bpy.context.window_manager
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
kmi = km.keymap_items.new(myplugin.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
addon_keymaps.append ((km, kmi))
The hotkey itself gets defined at the line starting with kmi. So far so good.
But i want to create an empty hotkey so that the users can define their own hotkey in the right click menu when they want. When i leave the kmi line away then the user does not have this option. And when i leave the hotkeys away then Blender moans.
How do i define an empty hotkey? One that allows the user to add their own one by right click? Like the one in my example image.
And while at it, is there a good tutorial when it comes to the hotkeys? The api doesn’t really make me happy here …