Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just installed VirtualBox (from Oracle) in Windows 7, and created a virtual machine with latest Ubuntu.

Here in Firefox I can use the left Ctrl key, while the right one doesn't have any effect. However, I can't use the AltGr key (also known as Right Alt) to produce e.g. curly braces like {} (I pasted that via Ctrl V).

In a terminal window I can switch the "Input method" to "Multipress", and then I can use AltGr to type e.g. {}, which is how I produced those characters for this posting. However, with "Multipress" the Ctrl keys seem to have no effect whatsoever. So in order to e.g. type Ctrl D I have to right click and switch the "Input method" to "System (IBus (Intelligent Input Bus))". Then AltGr does not work. So that intelligent input method is apparently not particularly intelligent. Even the acronym fails to make sense.

I tried specifying the compose key in the system settings keyboard layout.

With that, neither Ctrl nor AltGr worked.

Here's what xmodmap reports:

[~]
$ xmodmap -pke | grep -i control
keycode  37 = Control_L NoSymbol Control_L
keycode 105 = Control_R NoSymbol Control_R
[~]
$ xmodmap -pke | grep -i alt
keycode  64 = Alt_L Meta_L Alt_L Meta_L
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
[~]
$ _

How can I fix this?


Edit: additional info: the keyboard is a standard PC keyboard, a Logitech K120, with Norwegian layout.

share|improve this question
    
Reposted on Unix & Linux. Normally, I'd say to close the question here (we don't like multi-posting), but it's not possible at the moment due to the bounty. –  Gilles Nov 12 '11 at 20:39
    
@Gilles I looked for a way to move it. There was none apparent. If you are serious about teaching people to do that, then you should include information about how to do it, otherwise it's effectively no more than mindless bashing of a user (even though you got the terminology right, as opposed to the FAQ entry you linked to). –  Alf P. Steinbach Nov 13 '11 at 4:18
1  
On Stack Exchange, if you can't figure out how to do something, ask on chat or search or ask on meta. Not all topics have been covered on the per-site meta, so you might want to search on the main meta. In this case: How can I move a question to another SE site that isn't on this list? So, for future reference, you should have flagged your question and requested a migration to Unix & Linux. –  Gilles Nov 13 '11 at 13:33

1 Answer 1

up vote 8 down vote accepted

I got the AltGr key working in Ubuntu. I just had to know that I should create a file called ".Xmodmap" and add this line: "keycode 113 = Mode_switch Multi_key". Which I found in a bug report about a similar issue, at https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/349487/comments/1

share|improve this answer
    
Apparently the keycode number does not matter. And after doing this, the keyboard worked even after renaming that file and rebooting. –  Alf P. Steinbach Nov 13 '11 at 4:15
1  
oh, the joy of selecting my own answer as "the solution". heh. –  Alf P. Steinbach Nov 13 '11 at 4:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.