Hi,
I made an add on with an operator and just assigned a shortcut. I was just wondering if there is a way to remove and replace an existing keyboard shortcut to avoid a conflict between keyboard shortcuts?
The ‘C’ key is for the 3D Cursor in industry compatible keymap. I want to replace that ‘C’ key with my operator without getting into conflict with the existing one.
I want to make it so that as soon as I enable the add-on it sets all the shortcuts up for me rather than manually changing it in preferences.
def register():
bpy.utils.register_class(SomeCustomOperator)
kc = bpy.context.window_manager.keyconfigs.addon
km = kc.keymaps.get('3D View')
if not km:
km = kc.keymaps.new('3D View', space_type="VIEW_3D")
kmi = km.keymap_items.new("wm.3dcursor_auto-visibility", "C", "PRESS")
# how can i remove an existing C shortcut with this version?