I am using a Microsoft Natural Ergonomic 4000 keyboard on a MacBook Pro laptop and running Ubuntu in Virtualbox.
This may be useful for Emacs users.
The file swaps CAPS with Left CTRL and maps both the Right ALT key + Right WIN key to Right META.
Copy file to /usr/share/X11/xkb/symbols/pc
.
sudo cp pc /usr/share/X11/xkb/symbols/pc
Restart the machine.