# Adding a custom shortcut for sculpt mode

I read in the blender 2.6 wiki that there is no shortcut for sculpt mode. I would like to make Ctrl+Alt+Tab the shortcut to switch to sculpt mode, but based on the instructions for making new shortcuts I read here and here, it doesn't seem to work for me (because I'm doing it wrong).

How can I add this new shortcut?

There is a quite easy way to do it via the user preferences. You have to add the toggle in the input tab, 3d view, Object Non-modal section. Practically it's set up the same way the switches to weight paint and pose mode that are already there are.

• +1 for using User Preferences... But who would have thought to head for "Object Non-Modal?!" Using this you can also set up a shortcut for (even more fundamentally!) Object Mode. This stuff is important to anti-clutter obsessives like me, people with small screens, people who just want that 1on1, elemental relationship with their marvellous creations. For these people the modal shortcut problem actually begins one step earlier because the header (which is easy enough to get rid of by dragging its boundary) is too awkward to get back (using that tiny "+" icon)... And its the header which give – user2008 Dec 30 '13 at 11:51

Starting with Blender 2.68 (earlier versions have a bug):

• In the 3D view header click Object Mode to open the menu
• Right click on Sculpt Mode and choose Add Shortcut.

There is probably a better or more efficient way of doing this but this is one way to go about it..

The command for entering sculpt mode is bpy.ops.sculpt.sculptmode_toggle() . You can put this into a small script and register the desired shortcut…

import bpy

class EnterSculptMode(bpy.types.Operator):
bl_idname = "object.enter_sculpt_mode"
bl_label = "Toggle Sculpt Mode"

def execute(self, context):
bpy.ops.sculpt.sculptmode_toggle()
return {'FINISHED'}

self.layout.operator(EnterSculptMode.bl_idname)

def register():
bpy.utils.register_class(EnterSculptMode)

wm = bpy.context.window_manager
# change the shortcut here..
kmi = km.keymap_items.new(EnterSculptMode.bl_idname, 'TAB', 'PRESS', ctrl=True, shift=True)

def unregister():
bpy.utils.unregister_class(EnterSculptMode)