How to Switch Some Basic Keys in Windows (Windows VirtualBox Guest on OSX Host)

11

6

I am going crazy switching between Windows XP in a VirtualBox and the host (OSX), mostly due to the use of control-c, control-v, control-x and that they are different between the two OSes.

Is there any way to get my Windows machine to use different shortcuts OS-wide?

Edit: I really need a way to override Windows-C Windows-X Windows-V Windows-Z and Windows-Tab (copy, cut, paste, undo and switch-apps) for the solution to work for me.

Edit: Thanks for John T.'s help, I've got my autokey stuff working. I posted my final code for Windows guests on OSX here.

Dan Rosenstark

Posted 2010-01-29T16:31:53.213

Reputation: 5 718

Answers

2

Yep, check out Autohotkey. You can choose to have the hotkeys work on a per-application basis or system wide.

example:

^!n::Run C:\Windows

This will allow you to use Ctrl + Alt + n to open an explorer window to C:\Windows.

The hotkeys tutorial is a great start for making your own custom hotkeys.

John T

Posted 2010-01-29T16:31:53.213

Reputation: 149 037

Man I'm glad I asked. Are you the Jon Skeet of superuser? – Dan Rosenstark – 2010-01-29T16:55:57.677

You can make WinXP machine interpret some other keys as 'Copy', 'Paste' and other actions, but you cannot stop it from interpreting Ctrl+C and Ctrl+V the same way.
@John: how do you highlight hotkeys that way? I read the whole help, but didn't found anything regarding.
– whitequark – 2010-01-29T16:56:13.060

thanks whitequark. that might be fine. @John T, I edited the question to reflect what I need. Can Autohotkey do it? – Dan Rosenstark – 2010-01-29T17:04:30.583

AHK can do ^c ^v just as easily. And the keyboard keys are in <kbd> tags. – Phoshi – 2010-01-29T17:11:38.360

@Yar you can use #c::Send ^c to make the windows key and c send Ctrl-C, if that's what you're after? Similar with #v::Send ^v ... – John T – 2010-01-29T17:43:11.170

John, I think so, I just need to "interrupt" the <kbd>Windows</kbd> key, which I think should be possible. I'll have to get into this shortly and then mark you as best answer. Thanks again... – Dan Rosenstark – 2010-01-29T19:05:55.603

@Yar you're most welcome. Feel free to email me with any further discussion as I'm leaving for work now. I'll get back to you as soon as possible if you have any questions. – John T – 2010-01-29T19:56:15.637

Thanks John, I'm going to have to put in a tiny bit of work to get hotkeys to do what I want, but I think I have all the pieces I need. – Dan Rosenstark – 2010-01-30T02:00:46.000

John T I'm marking this as best answer, and I put my script in the question. You rock, thanks again! – Dan Rosenstark – 2010-01-30T02:35:41.437

@Yar, good timing I just got in :) To map win+tab you can use #tab::send ... (replace the dots accordingly). – John T – 2010-01-30T02:37:10.483

Thanks John, we just crossed messages, everything worked out nicely, had to work with LWin & Tab::AltTab because it maps to AltTab. – Dan Rosenstark – 2010-01-30T02:41:12.080

And blogged, too http://linkee.com/5Ir

– Dan Rosenstark – 2010-01-30T02:52:24.223

7

Just for the Super User archives, something I found at some blog. ;-)

  1. Change your Host key on VirtualBox to be the RIGHT command key

  2. Download AutoHotkey

  3. Put this script in as the startup script

 #SingleInstance force
 #r::Send ^r ;reload
 #z::Send ^z ; undo
 #y::Send ^y ; redo
 #f::Send ^f ; find inside apps
 #c::Send ^c ; copy
 #x::Send ^x ; cut
 #v::Send ^v ; paste
 #t::Send ^t ; new tab, Firefox
 #s::Send ^s ; save inside apps
 LWin & Tab::AltTab ; the motherlode, alt-tab!

and you're up and running!

Arjan

Posted 2010-01-29T16:31:53.213

Reputation: 29 084

I love that blog! I'm like the only reader! Thanks Arjan... – Dan Rosenstark – 2010-01-30T16:06:28.567

5

First change the Host Key to Right Command key...

And then change all usages of Windows key to Control Key, in your AHK script.

LWin::LCtrl
LCtrl::LWin

Now the keys are remapped for all shortcuts!

phyatt

Posted 2010-01-29T16:31:53.213

Reputation: 231

1this is exactly what I was looking for – Aprillion – 2016-07-01T12:24:51.050

0

You can also use SharpKeys to remap the keys. I found this HowToGeek article helpful for walking through the steps on OS X and Windows.

RedMatt

Posted 2010-01-29T16:31:53.213

Reputation: 1