Removing keybinds

Keybinds (keycodes, shortcodes) are keyboard shortcuts assigned to specific actions in Blender. For example, pressing “Shift + a” opens the menu for adding new objects to the scene. Keybinds are incredibly important in Blender, as most workflows rely on keyboard shortcuts. However, sometimes we need to remove keybinds.

The easiest way to delete keybinds is manually.

To do this, open the “Preferences” area, switch to the “Keymap” tab, find the desired keybind in the list that appears, and remove it by pressing the “X” button.

Keybinds can also be deleted using the Blender Python API.

In the API, all keybinds are stored in a “keymap” container. There are many such containers, each intended for its own purpose. For example, add-on developers typically place all keybinds assigned to each add-on in a single keymap.

We can get a list of all keymaps using the keymaps list.

For convenience, we can display a list of keymaps along with their names.

Keymap can be retrieved from a list by name. For example, for the “Info” keymap:

Given a pointer to the desired keymap, we can get a list of all keybinds contained within it.

Let’s pring all keybindings for the “Info” keymap.

Having a pointer to the desired keybind and the keymap it belongs to, we can remove the keybind.

For example, let’s delete all keybinds from the “Info” keymap.

This way, we can remove absolutely all keybinds in all keymaps. Well, just in case you need to do that (No!).

Keep in mind that after executing this code, Blender will be practically unusable!

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments