Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import bpy
wm = bpy.context.window_manager
CopiedMap ="CopiedMap")
#Get list of default keymap items
keymaps = wm.keyconfigs.default.keymaps.items()
for i in keymaps:
#Put default values in to new keymaps[1].name, space_type= i[1].space_type,
#Get list of default keymap_items contained
#within the keymap
keymap_items = i[1].keymap_items.items()
for j in keymap_items:
#Put values in to new keymap_items
CopiedMap.keymaps[i[1].name][1].idname, j[1].type, j[1].value, any=j[1].any,
shift=j[1].shift, ctrl=j[1].ctrl, alt=j[1].alt,
oskey=j[1].oskey, key_modifier=j[1].key_modifier)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment