3

I've used the following xmodmap script for years to swap my Left Ctrl and Caps Lock keys in Linux:

remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

It's also worked in my Windows 8 VM, running in VirtualBox, just fine until recently. Now, the remapping no longer applies to the Windows host - I think it started with the release of VirtualBox 4.3.16. When I try to use the regular Left Ctrl, it triggers Caps Lock in the Linux host.

Samir Unni
  • 347
  • 1
  • 8
  • 19
  • It looks like you tried to add a solution to this question to a different answer. Just post your own solution as an answer (you are allowed to answer your own question). – fixer1234 Nov 26 '14 at 02:39
  • Just for reference: there's [one bug report about this](https://www.virtualbox.org/ticket/13404). – njsg Sep 28 '16 at 14:43

1 Answers1

0

Just install SharpKeys and follow these directions to swap Left Ctrl and Caps Lock. The guest's and host's responses to the two keypresses should then be in sync.

Samir Unni
  • 347
  • 1
  • 8
  • 19