Keymapping

  • Blender's keymaps are layers, not deltas.

        BUILT-IN PRESETS
┌──────────┬──────────┬───────────────┐
│ Blender  │ Blender  │   Industry    │
│          │   27x    │   Compatible  │
└──────────┴──────────┴───────────────┘
            │
            ▼
        USER MODIFICATIONS
            │
            ▼
        WHAT YOU USE
  • Your edits in Preferences → Keymap are not stored inside whichever preset you currently selected.

  • They are stored separately as a user keymap diff.

  • User modification applies to whichever preset is currently being used .

    • If your change did not initially exist in the initial presets, Blender will change all default presets:

      • In other words: “If you create a user keymap entry that doesn't correspond to an existing entry in the selected preset, that entry is stored as a user modification and is applied on top of every keymap preset.”

      • Example :

        • Create a new entry in a user preset: all "Blender", "Blender 27x" and "Industry Compatible" will now also have this entry and will have the option to "restore".

        • If you do "restore" on ANY of "Blender", "Blender 27x" or "Industry Compatible", the user preset will also have it's modification reverted.

  • Blender's presets are basically different sources of default keymaps, not independent user-editable copies .

My method

  • I convert the user-modified state into the actual contents of the preset.

  • The preset is now a snapshot, rather than a set of changes relative to Blender's current defaults.

Workflow
  • When to do it?

    • It's good to do the workflow once in a while.

    • There's no immediate problem to leave some "user modifications" hanging (restore's), but it's a good practice to do the workflow as soon as possible, to avoid insanity.

  • Make a change.

  • Export the file.

    • Do not  check All keymaps . This is not necessary, and will just export unselected presets.

    • The name of the file can be the same of the current preset used.

  • Import the file.

  • Go to the 'Blender' preset and check every 'restore' you found.

    • This ensure that there's no "user modification", and the only source of truth is the new imported preset.

  • The final result will look like:

    Blender preset
        └── no user modifications
    Blender 27x preset
        └── no user modifications
    Industry Compatible preset
        └── no user modifications
    My preset // <- this one is selected
        └── no user modifications
    
  • Check "Save Preferences", just because.

  • Move the exported .py  file to a backup folder, just because.

Rules
  • ON A STABLE KEYBINDING SETUP, THERE SHOULD BE NO RESTORES IN ANY PRESET .

  • You can :

    • Delete keybindings.

    • Do whatever you want, as long as you follow the workflow.

Advantages
  • Example:

    • if you switch:

      • Blender → My preset

    • there isn't a hidden:

      • + user modifications

    • following you around.

    • Your preset itself contains the changes.

    • And if you switch:

      • My preset → Industry Compatible

    • your custom changes don't follow you, because they're no longer in the shared user layer.

  • Example

    • Blender 5.1 might introduce

      • New default: Ctrl+Alt+Q → New Operator

    • Your existing concrete preset won't automatically acquire it.

The Python File
  • Any change to a 'keymap' in the preset creates an entire huge category in the .py file, making maintenance of what changes were made ridiculously and unnecessarily difficult.

    • Because of this, you must be very CAREFUL using RESTORE , as it may not restore multiple presets at the same time due to high keymap dependency.

    • IF YOUR PRESET HAS ANY 'RESTORE' , do the following: Export the preset -> delete the previous preset -> reimport the preset -> finally restore the 'Blender' preset.

      • If this is not done, the modifications will be linked to presets. This also indicates that there are "unsaved changes" in your preset.