context menu shortcuts - system dependent?


I am trying to give the snap element menu the same hotkey ability as the selection mode has.

I found the corresponding python code and some lines in a .c file… but I hit a problem - I didn’t see anything that would resemble a hotkey. Furthermore I think that it could be dependant on the Blender’s top level UI because most of the PC/Windows software displays the same behaviour when you hit the Alt key alone, e. g. Hit Alt, menu items become underlined, hit F and the File menu opens. In a similar fashion CTRL-TAB and then V selects the vertex select mode, and I woule like to extend this to CTRL-SHIFT-TAB & V to select the Volume snapping mode.

So is there the solution I seek or is there nothing that can be done? I specifically want it to work in the way I described it.

Hi Kogomat,
Interesting issue…
Firstly, I’m on 2.77a in Linux. The menus are inconsistent. I get this…
When I click on the snap_element icon in the header the menu highlights and accepts the hotkeys for the different snap elements, but when I do Ctrl-Shift-Tab the menu that pops up doesn’t. As far as I can tell blender is accessing the same menu, but is acting differently depending on how it was called.

Before beating on building a workaround, I’d talk to the guys in the technical support forum( ) and ask if this inconsistency is by design, or can’t be fixed. I certainly wouldn’t call it a bug… but it does appear to be a non-feature. :slight_smile:



With a little digging I figured out how to put an individual snap_element setting on a hot key if that helps…

Under 3D View(Global)
Command: wm.context_set_value
Context Attributes: tool_settings.snap_element
Value: ‘VOLUME’


OK, I’ve never done this before(in quite this way)

Here’s an add-on that creates a custom snap menu that properly sets shortcuts.

Add the .py file to your addons folder
load the addon. It will show up in the testing support level and mesh category
Put it on a hot key in 3D View(Global)

Command: wm.call_menu
Name: Custom_SnapElement_Menu

I hope that works for you. If it gives problems let me know.

Attachments (795 Bytes)


Trying your add-on out showed me exactly what I was trying to achieve. Ah, the simplicity of not having to move my mouse.

Having said that my point really was to have the native interface this sort of functionality without an addon. Though if there is no difference in just changing the hotkey to call the new menu type… who cares as long as it works, right? :smiley:

Thanks for the file too. I’ll gladly take it apart and see what makes it tick.