# How? (for blender 2.8) to set hotkeys for specific screen space (workflow editors)?

I used to have a pie menu hotkey that let me go to node editor, or UV editor or video editor.

Within preferences, calling each editor was Screen.set_layout, then there was another box within that hotkey that allowed you to put the name of the editor you wanted.

In Blender 2.8 I don't know what words/code to put in there.

In 2.80 screen layouts have been replaced with workspaces. This refers to the entire layout of blenders window.

Using python we can change the active workspace with

nws = bpy.data.workspaces['Animation']
bpy.context.window.workspace = nws


I don't see an operator that allows us to change the workspace in 2.80, at least not without creating a new workspace. That would require writing an addon to add that functionality.

We can change the current editor (the one the cursor is over), to do that we use

bpy.ops.screen.space_type_set_or_cycle(space_type='VIEW_3D')


row.operator("screen.space_type_set_or_cycle").space_type = 'VIEW_3D'

When using that in the kemap editor, you enter screen.space_type_set_or_cycle and then choose the editor type in the menu.