Ubuntu – Keyboard shortcut to switch focus between separate X screens

multiple-monitorsshortcut-keysxorg

I'm using XFCE on a dual monitor setup, with Xorg configured to separate X screens (neither twinview nor cinerama is working on GF470 with latest nvidia drivers). I'm not using xrandr.

Suppose I have firefox running on one screen (:0.0) and thunderbird on the other (:0.1). When I want to switch focus from thunderbird to firefox, I need to move my mouse pointer to the firefox window and click (alt-tab switches between windows on a single screen only).

Is there any keyboard shortcut for switching focus between screens?

Best Answer

I managed to figure this out for myself on Ubuntu 10.10 (Gnome in my case). There doesn't appear to be a built-in shortcut, but there is a useful utility called DualscreenMouseUtils:

  1. Download dualscreen-mouse-utils archive from here
  2. Extract the archive: tar -zxvf
  3. Build the util: make mouse-switchscreen
  4. Copy the created executable to a bin directory, e.g. /usr/local/bin
  5. Set up a keyboard shortcut using your window manager that runs the executable whenever the shortcut is used.