Creating custom keyboard shortcuts

There are two types of actions I rely on all the time and would like to access more quickly: ・ Selection Type - Vertex, Edge, Face [thinking to assign Cmd+1,2,3 respectively]
・ Snap Element - Increment, Vertex, Edge, Face, Volume [thinking to assign Opt+`,1,2,3,4 respectively]
* Above example key assignments are Mac-specific, but you can surely imagine a useful equivalent on any OS. The trouble is, for some reason both sets of these essential and frequently-used actions appear to be missing from the shortcut (re)assignment options. I looked in Blender’s Preferences under the Input tab and searched for both “select” and “snap” but to no avail. Is there a way to assign shortcuts for these that I’m recklessly overlooking, or is it just a sad impossibility? Thanks.

・ Selection Type - Vertex, Edge, Face [thinking to assign Cmd+1,2,3 respectively]
Under 3D View / Mesh add the attached new shortcuts (just add the Cmd option in your case)
1 = vertex select mode
2 = edge select
3 = face select mode
4 = vertex + edge + face select mode

・ Snap Element - Increment, Vertex, Edge, Face, Volume [thinking to assign Opt+`,1,2,3,4 respectively]
By default this is Ctrl+Shift+Tab

Oh man, you just saved few days of my life :slight_smile:
I came from 3d max and get used to its hotkeys. I set it to 1, 2 and 3.
The only question - is there a possibility to make similar hotkeys for converting from one type of selection to another?
For instance I selected vertex and I need to select all faces sharing this vertex, or edges.

For instance I selected vertex and I need to select all faces sharing this vertex, or edges.
Is this the same as Select More ?

not really :frowning:
suppose you have some complex edge selection - almost loop but not closed.
after executing Select More you’l get connected faces AND connected edges with them :frowning:
all I need is to get faces sharing selected edges.

All select options are in the Select menu. If it’s not in there then the specific function is not in blender and you’ll have to find a workaround

Mr. Marklew, you sir, have just saved me heaps of time! I am thrilled to learn that there is a way to do this!
I really can’t thank you enough :slight_smile:
I am updating the thread title and adding a [SOLVED] status.

Further questions:
How did you find that the button’s Python name is tool_settings.mesh_select_mode? Those don’t have mouseover hints.
And what would be the syntax for other types of buttons that are not true/false arrays?

Thank you!

I found the answers and will post here for future seekers.

Q: How to find the button’s Python name?
A: As the manual explains -
“Pressing CtrlC over these buttons copies their python command into the clipboard which can be used in the python console or in the text editor when writing scripts.”

Q: How to know what value to put in for the set value?
A: Watch Blender’s console as you change the setting.
In the example of Snap Element this is what the console shows if you select each snap mode sequentially:

bpy.context.scene.tool_settings.snap_element = ‘INCREMENT’
bpy.context.scene.tool_settings.snap_element = ‘VERTEX’
bpy.context.scene.tool_settings.snap_element = ‘EDGE’
bpy.context.scene.tool_settings.snap_element = ‘FACE’
bpy.context.scene.tool_settings.snap_element = ‘VOLUME’

So then to set shortcuts for [Opt `] [Opt 1] [Opt 2] [Opt 3] [Opt 4] respectively, one would go to button settings under
3D View > 3D View (Global) and add five buttons with these settings:

Talking to myself here at this point, but continuing to post findings in case others find hotkey customization as exciting as I do :wink:

Here is a much quicker way to subdivide - something we do all the time when modeling.
Instead of bringing up a menu to scroll through, how about just ‘D’ for subDivide.

add in 3D View > Mesh

※ Note that when subdividing from the ‘W’ key menu the console reads:
but when we program the shortcut all we need to enter is:
and the specific parameters automatically appear below.

※ You’ll probably also want to make the D shortcut apply to the other applicable object types too:
3D View > Curve curve.subdivide
3D View > Armature armature.subdivide

Further discovery… thanks to a poorly made yet informative video tutorial.
You can assign or remove shortcuts for menu items by Right Clicking on them!

Just beware that conflicting key assignments are, far as I can tell, not automatically checked for.
So if you’ve assigned a shortcut but it’s not working, most likely the cause is not a bug, but a key conflict.

Snap-To operations are used very frequently, especially when precision is called for.
These are an example of shortcuts you’d assign by Right Clicking on the menu item.
Key configuration details then get listed in Preferences:

I used the ` key but by default this is a shortcut for View > Show All Layers.
The default assignment first had to be removed. Notice the shortcut is no longer listed:

If you’re not sure if a key command is already in use, search by key-binding in Preferences.

That covers how to assign shortcuts for both menu items and buttons. :slight_smile:

The next things stumping me involve the number keys:

  • Why is it that when I try to assign a regular key as a modifier key (such as [Q 1] instead of [Ctrl 1]) it doesn’t work?
  • How to reassign the layers buttons to be [Shift 1] [Shift2] … (I have Emulate NumPad enabled, seems to override Shift+Num input)