# How to toggle material view mode by hotkey (similar to Alt-Z/Shift-Z)

I want to be able to toggle "Material" view mode by using hotkey. Shift + Z toggles rendered mode and Alt + Z toggles textured mode.
I want my hotkey to toggle material mode.

I tried to assign a new hotkey with the following command I copied from console window:

bpy.context.space_data.viewport_shade = 'MATERIAL'


But it didn't work.

You can add the new shortcut by :

• go to User_Preferences > Input > 3D_View > 3D_view(Global) > Add_New
• setup the new shortcut as follows ( ⇧ Shift + Q are just an example choose your own ) :

• @IvanKartofanov you're welcome ,always look at similar shortcuts to figure out how to add new ones – Chebhou Mar 5 '15 at 10:43

Apart from the already given, and fine, answer, you could also enable the pie menu addon. This changes some common hotkeys (like Z) to show a pie menu. It takes a bit getting used to, but after a while it's fast and pleasant to work with.

• Definitely way better than trying to keep track of the other hot keys. Furthermore, the pie menu always keeps the options in the correct orientation even if not all are there to aid in (muscle?) memory. – JakeD Sep 29 '16 at 18:08

You can make your own shortcut.

I set the "Shift + Alt + Z" keys to switch to the material view. When the buttons are first pressed, it switches to "material view". Pressing the second time changes to "solid view".

All you have to do is create a shortcut. File > User Preference...(or Ctrl+Alt+U) > Imput You can create a shortcut to "3D View > 3D View(Global)" (Other field shortcuts are also here.)

Then you have to press "Add new". And you can do it like in the image.

You can change the shortcut key (Z) and other options(Shift or Alt).