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 ( &#8679; Shift + Q are just an example choose your own ) :