Switching between Workspace with Ctrl + Arrow keys

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
wafanulu
Posts: 2
Joined: 23. Jan 2018, 11:21

Switching between Workspace with Ctrl + Arrow keys

Post by wafanulu »

Hello,

I am using Windows 7 with Virtual Box 5.2.6 r120293 (Qt5.6.3) on macOS 10.12.6 Host.

I recently switched from Parallels Desktop to Virtual Box. I generally run my browser on my macOS host in full screen and another fullscreen window of Virtual Box Windows 7. I use Control + left or right arrow to switch between the full-screen workspace instead of the swipe gesture in trackpad. When I am in the browser window on the host I am able to switch to the virtual box window with the shortcut but not the other way. Is there a way to tell the virtual box to ignore this key combination?

This shortcut works fine with Parallels.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Switching between Workspace with Ctrl + Arrow keys

Post by socratis »

wafanulu wrote:Is there a way to tell the virtual box to ignore this key combination?
Nope. All keys go directly to the guest, with the following notable exceptions: Cmd+Q, Cmd+H, for obvious reasons both of them, and of course the HostKey. And this BTW is dictated by the underlying Qt toolkit, based on Apple's guidelines. Better get used to start using your trackpad... ;)
wafanulu wrote:This shortcut works fine with Parallels.
So, what happens when I run an OSX guest, similarly configured as your host (with multiple desktops) and with the same shortcut key? Who get the "key event"? The host or the guest? And why one over the other?

One more suggestion, in addition to the trackpad use, would be to be explicit about it. So, press the HostKey once, then your combination for switching workspaces. That way you'll definitely be telling VirtualBox that the next keystroke will be for the host. I have my HostKey set to RightCmd, and the switch workspaces to LeftCmd+Opt+Shift+Left/RightArrow (or a number). So, for me it would be:
  • RightCmd (once, alone), LeftCmd+Opt+Shift+Left/RightArrow, or
    RightCmd (once, alone), LeftCmd+Opt+Shift+4 (for example).
Yes, I was playing a lot of Doom, with only the keyboard available, we couldn't afford a mouse... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
wafanulu
Posts: 2
Joined: 23. Jan 2018, 11:21

Re: Switching between Workspace with Ctrl + Arrow keys

Post by wafanulu »

So, what happens when I run an OSX guest, similarly configured as your host (with multiple desktops) and with the same shortcut key?
I haven't tried this.
One more suggestion, in addition to the trackpad use, would be to be explicit about it.
This does the trick. Thanks.

It is bit annoying when I realize that these key combination doesn't work when I switched from Parallels to Virtual Box.
GlenK
Posts: 2
Joined: 8. Mar 2019, 01:17

Re: Switching between Workspace with Ctrl + Arrow keys

Post by GlenK »

This is years late, but I thought I would post the solution I found works for me.

in the VM menu bar, if you to to Input->Keyboard->Keyboard Settings..., then in the dialog deselect "Auto Capture Keyboard", then I have found that you can switch desktops without issue. Regular keypresses still go to the VM. In my case, I'm using a Logitech mouse that sends Ctrl-Left Arrow and Ctrl-Right Arrow as shortcuts so this works great.
SMXBob
Posts: 6
Joined: 11. Feb 2021, 23:49

Re: Switching between Workspace with Ctrl + Arrow keys

Post by SMXBob »

GlenK wrote:This is years late, but I thought I would post the solution I found works for me.

in the VM menu bar, if you to to Input->Keyboard->Keyboard Settings..., then in the dialog deselect "Auto Capture Keyboard", then I have found that you can switch desktops without issue. Regular keypresses still go to the VM. In my case, I'm using a Logitech mouse that sends Ctrl-Left Arrow and Ctrl-Right Arrow as shortcuts so this works great.
Excellent! Thanks for that quick and easy fix! It was driving me nuts
a_q
Posts: 1
Joined: 2. Nov 2022, 13:52

Re: Switching between Workspace with Ctrl + Arrow keys

Post by a_q »

Thanks I tried this (from Win 10).

However it's a blunt tool, and also disables <Alt>-<Tab> window switching too.

I wonder if there's a happy medium?
Post Reply