How to input accented characters to an OS running in a VM? I have a MacBook Pro with English (US) keyboard layout. I usually hold the right-alt (option) key, and press E to activate the accented vowel insertion (it shows a placeholder where the accented letter—á/Á, é/É, í/Í, ó/Ó, ú/Ú—would appear), and after pressing the corresponding vowel it will be inserted in place. Similar procedure using the N key to insert the ñ/Ñ characters.

I also have an Ubuntu Desktop computer with Latin American keyboard layout. Latin American Spanish keyboards have the acute accent character ´ right after the P key. In order to insert an accented vowel, you type first the acute accent, and then the vowel. Similarly to insert the ñ/Ñ characters, one would type the ~ character and then the n/N letter.

Everything fine until here.

The problem is when I have to run a Linux OS on a Virtual Machine (VirtualBox) on the Mac. I don't have the ´ character on the physical keyboard, and the right-alt (option) key doesn't have the same effect as in Mac OS.

The question here is, if there's a way to insert international (or at least accented vowels, which are the ones I mostly use) characters from the physical keyboard of the Mac, to the guest OS in the VirtualBox?
You can simply change the keyboard layout in Ubuntu without any changes to OS X:



Then you can type like you would do on your Latin American keyboard.