import bpy
wm = bpy.context.window_manager
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode')
kmi = km.keymap_items.new('object.origin_set', 'C', 'PRESS', alt=True)
kmi.properties.type = 'GEOMETRY_ORIGIN'
# --> kmi.properties['type'] = 'GEOMETRY_ORIGIN'
In some operators the properties can be accessed as variables. In some others properties that exist in side operators, only as dictionaries (the commented line).
How do you detect how to access the properties?
I use the try-except
blocks but it does not work. Any other ideas?