How to toggle workspace by hotkey in Blender 2.8?

Hi! Is theree the way to toggle workspace by hotkeys? For example UVEediting workspce is one hotkey, Sculpt workspace is another hotkey and so on? For now we can toggle workspaces by ctrl+pageup and pagedown but it’s not handy at all…

Would like that, too. But checking the code for available operators, I’m rather sure the answer is no. It would be easy to do that via an add-on, though.

On the python console, it can be done like this:

C.window.workspace = bpy.data.workspaces[“Material”]

Just needs someone to put it into an addon :wink:

1 Like

First of all, you can change workspace cycle hotkeys to something closer, Ctrl + Right \ Left Arrows are pretty good.

If you just want hotkeys to switch into specific workspace, here how you do it:

1 Add new hotkey entries to Screen / Screen (Global)
2 In Identifier field you should put wm.context_set_id
3 For Context Attribute you should use window.workspace
4 Use names of your workspace tabs in Value field

In my example I can switch into Fullscreen workspace with Ctrl + Up Arrow and into Materials workspace with Ctrl + Down Arrow.

4 Likes

Ha, learned something new. A generic operator to set stuff to specific values. Nice. Thanks.

Thanx a lot!!! thats exactly what I need

This seems to be broken in Blender 3.3. The context attribute field changes to window.workspace[‘category_indices’] and is red.

Anyone know if there’s an updated command that works to toggle workspace by specific hotkey?