10

Is there a keyboard shortcut to switch the focus between monitors in GNOME on Ubuntu 20.04 LTS? I do not want to have to move the cursor between monitors, or Alt-Tab to the window on the other monitor.

Alternatively, I would be fine with a solution that assigns the first workspace to the secondary monitor, so that I can simply switch to the first workspace in order to switch to the secondary monitor.

1

3 Answers 3

3

There is a related issue tracked here, about having a separate workspace per monitor.
As per a comment in the above link, you can enable workspaces for all monitors, but switching the workspace on one monitor causes it to switch on all of them (i.e. workspaces are not independent as per this feature request).

# Enable workspaces on all monitors
gsettings set org.gnome.mutter workspaces-only-on-primary false

You can consult this link for keyboard shortcuts for moving between workspaces, namely Super+Page Up or Ctrl+Alt+Up, Super+Page Down or Ctrl+Alt+Down.

2

This is a dirty workaround, and other suggestions in this post might work well for you. But I'd like to share what I did for the exact purpose. I simulated a mouse click somewhere on the top bar of the screen, from Settings-> Keyboard Shortcuts. Unfortunately, it only works if your window is full screen or it is in the designated area.

Here are the commands (depending on your window resolutions. Mine are 1920x1080 for both screens. So it is 500 px away from the left corner for both screens):

Left screen: xdotool mousemove 500 0 click 1
Right screen: xdotool mousemove 2420 0 click 1

1

Unfortunately no, it apparently does not work this way in Gnome. In Gnome, you switch applications and/or windows, and the focused monitor will be where the window happens to be. This switching is done using Alt+Tab or using the application overview, that happens on the primary monitor.

There is little or no control on which monitor a newly started application will be opened. There are shortcut keys, though, to move a focussed window to another monitors: Super+Shift+.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .