17

I installed Ubuntu under VirtualBox on my Windows 7 machine. All is working okay, except that when I type a hyphen - I get an apostrophe ' instead. This happens on the command line, in the browser, and elsewhere.

Where can I change the keyboard settings to apply the correct character when keys are pressed?

I'm using VirtualBox 4.1.14 and Ubuntu 12.04.

1
  • 2
    Could you tell us which type of keyboard do you have and which layout you choose. Note: there are several QWERTY keyboard, try to be more specific if you can.
    – Huygens
    May 8, 2012 at 20:50

4 Answers 4

13

If you open up the launcher and search for keyboard layout, you get the system dialog which controls what layout you're using. Add your keyboards layout to the list and then set it as the default :)

2
  • 1
    That was it. For some weird reason it was set to "Italian".
    – user237815
    May 8, 2012 at 22:52
  • Works for me as well !!! Mar 29, 2023 at 4:12
9

If you do not have a GUI installed then you can also fix this via the command line:

sudo dpkg-reconfigure keyboard-configuration

The keyboard type on the first screen will likely be correct ("Generic") then when you hit OK (Enter) the other screens will prompt you for language etc. Use arrow keys to scroll up and down between options and "Enter" for OK.

2
  1. Select the large cog in the bottom left hand corner for System Settings.
  2. Select Keyboard layout (not Keyboard).
  3. Use the plus button to add your keyboard.
  4. The minus button to deselect Italian.
1
  • This saved me some tome, as the downloaded vbox image had italian.
    – RainDoctor
    Aug 15, 2014 at 23:02
0

I had a similar problem with Bitnami Drupal Virtual Machine, running on a VirtualBox instance on Windows 10; in my case, the keyboard is using the Italian layout, but the virtualized Operating System (Ubuntu 64-bit) thought it was using the English layout.

I ran sudo apt-get install console-common, I was asked to choose the layout, and when I selected the Italian one, all went fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .