When using RealVNC's VNC Viewer Enterprise Edition on Windows XP, to connect to an RHEL machine running a GNOME2 session, I have configured the VNC client to turn on the "Pass special keys directly to server" option. This means that when the client is in focus, the Alt+Tab combination switches focus between the windows that are open in my GNOME session (on the VNC server).

However, when the client is not in focus, Alt+Tab switches focus between windows open on my Windows XP desktop.

This becomes a problem when my Windows XP desktop looks like:

[WinXP_window1] [[GNOME_window1] [GNOME_window2]] [WinXP_window3]

If I'm on [WinXP_window1], and want to get to [WinXP_window3], I simply cannot do it using the keyboard, because the moment the VNC client comes into focus, it starts capturing Alt+Tab. I'm forced to click with the mouse instead (which is irritating).

How can I get around this problem, while still having my GNOME windows respond to Alt+Tab properly?

An acceptable solution shouldn't require the installation of any program on either the client, or the server (I don't own either, and don't have administrative privileges / root access).

  • 1
    10 years later, and I would still recommend a better client, like UltraVNC (specially the "DirectX" version). Yeah, I know that would require a installation - just a way to better solve OP's problem. Jan 24, 2023 at 21:00

1 Answer 1


It's probably easier to just change the hotkey for switching between windows within Gnome2 to something that doesn't involve "special keys", then uncheck the Pass special keys directly to server checkbox. That way, you can alt-tab and it will ALWAYS (regardless of focus) work on the XP box, and your reassigned hotkey will switch between windows in the guest, as long as the VNC client has focus.

Check out the GNOME2 Users Guide for info on customizing shortcut keys.

Obviously you can't make it something like "a" because you will be typing that a lot, so maybe try a function key that isn't already used, or unassign a function key that is assigned to something you never use, and re-assign it to switching windows.

Remember that Shift is not considered a special key because obviously you can type "ABCD" within the guest, so you can use, say, Shift+F1 as a possible key combination if plain old pressing a function key seems too dangerous to you. But by disabling Pass special keys directly to server, I don't think you can use Alt or Ctrl anymore.

Edit/Update: If you want to use an alternative task switching hotkey in Windows without changing the key bindings within the remote host, you can try, e.g. AutoHotkey, which is a program that will intercept other hotkeys and perform the same functionality as Alt+Tab. See here for info. Important: Since you still want to use Alt+Tab within the guest, you will need to leave Pass special keys directly to server enabled in VNC, so that Alt+Tab gets handled properly for the remote host. You will still be unable to literally use the Alt+Tab key combination to task switch the host when the VNC window has focus. But you can bind another hotkey using AutoHotkey on the local machine, so that you can press something like Shift+Esc or Shift+F5 to task switch on the host. Note that you will not be able to use your modifier keys (Alt, Ctrl) for the AutoHotkey re-bind command either, because those keys will get trapped by VNC.

From the link:

Substitutes for Alt-Tab: Hotkeys can provide an alternate means of alt-tabbing. For example, the following two hotkeys allow you to alt-tab with your right hand:

RControl & RShift::AltTab ; Hold down right-control then press right-shift repeatedly to move forward. RControl & Enter::ShiftAltTab ; Without even having to release right-control, press Enter to reverse direction.


You must log in to answer this question.

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