Workspaces keyboard shortcut

Is there a way to change the default shortcut of switching Workspaces?

You can add new ones, but you can’t change the existing ones.

The Shortcuts preference app can be set up to call the Workspaces app from the command line to do that. (There are also some external command line apps for this.)

Here’s a pic of my preferences app using workpacesctl:

https://forge.full0fstars.net/Public/workspacesctl/src/branch/main/shortcuts.png

1 Like

Unfortunately I don’t have workspacesctl command in /boot/system/bin
There isn’t also one in HaikuDepot.

workspacesctl is an app I wrote for this before the builtin Workspaces app could do all this. I still use it, but you should probably just use the builtin Workspaces app. :slight_smile:

You can run it from Terminal by hand first to explore what the arguments do.

root@morgiana ~:Workspaces --help
Usage: Workspaces [options] [workspace|direction]
where “options” are:
–notitle title bar removed, border and resize kept
–noborder title, border, and resize removed
–avoidfocus prevents the window from being the target of keyboard events
–alwaysontop keeps window on top
–notmovable window can’t be moved around
–autoraise auto-raise the workspace window when mouse is at the screen edge
–help display this help and exit
-i display workspace layout and exit
“workspace” is the number of the Workspace to which to switch (+|-|0-31)
and “direction” is the direction of the Workspace to switch to (left|right|up|down)

So, for example, to switch left use the command "Workspaces left’.

Wow!

You didn’t mentioned it’s your own program.

Look at the screengrab. It works from Shell but woun’t work as a shortcut.

I need it under LAlt + Space

Ah; there’s probably no command $PATH when it’s running as a Shortcut; try the full path to the command:

/boot/system/apps/Workspaces left

Sorry. Forgot to mention that full path won’t work as well.

Huh. I checked the default shortcuts at:

and it doesn’t look like ALT-[space] is taken by the OS.

Try using CTRL instead of ALT? Try a different key from [space]?

(Just to confirm that it works with some key combo?)

Oh, also remember that shortcuts aren’t active till you click the save button in that window?

1 Like

Shift+Space and Opt+Space work. Alt and Ctrl doesn’t. So, I choose the LOpt key.

BTW, as for path, the standalone app name doesn’t work.
Full path works. Also partial path (/system/apps/Workspaces) works. Strange.

I discovered a nice thing:

My workspaces app has vertical 1x3 layout. I set “Workspaces down” shortcut only.
And it works “in round”, the way that don’t pushes me to set up “Workspaces up” shortcut. When I’m on the most bottom workspace LOpt + Space (Workspace down) moves me up to the most top one.
It’s nice.

“/system” and “/boot/system” point to the same place. You can usually leave out “/boot” anywhere. :slight_smile:

I had to tweak my keymap to get left ALT and right ALT to both be the same key; you may need to look at how your keymap is treating them to get ALT working how you want it to as well.

But at least now you know how to add shortcuts for workspace navigation. :slight_smile:

1 Like

This is not a partial path, this is the full path to the workspaces app :slight_smile: