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.

My question mark key in my keyboard isn't working. ("?"). I've tried to use xev and showkey -k to try to identify at least a keycode and manually use xmodmap to map it.

Unfortunately, the keys aren't being detected in neither utilities. I'm using Ubuntu 10.04 in a Virtual Machine (VirtualBox 3.2.4 r62467), and my Kernel is 2.6.32-22-generic. My Host is an Ubuntu 8.04.

When I run xev in my host, I get:

KeyRelease event, serial 30, synthetic
NO, window 0x3600001,
root 0x5d, subw 0x0, time 19346721, (726,722), root:(730,746),
state 0x2010, keycode 211 (keysym 0x2f, slash), same_screen YES,
XKeysymToKeycode returns keycode: 61
XLookupString gives 1 bytes: (2f) "/"
XFilterEvent returns: False

And when I run showkey -v:

0x59 0xd9

xmodmap -pk about this key in guest:

0x002f (slash)  0x003f (question)   0x002f (slash)  0x003f (question)   0x00b0 (degree) 0x00bf (questiondown)

...in host:

 0x002f (slash)  0x003f (question)   0x003b (semicolon)  0x003a (colon)  0xfe60 (dead_belowdot)  0xfe56 (dead_abovedot)

But when I click it on my guest it simply doesn't work.

Some related tickets in Virtualbox: #4957, #599 and #205.

What can this be? It's not a special multimedia key, it's a simple one. I would like to understand what exactly is happening so at least I can try to better debug this issue. If it's detected in my host, why it isn't in my guest?

share|improve this question
    
Does ? work on the console (Ctrl-Alt-1)? What keyboard layout do you have (US, European, etc.)? Does showkey -k show you any keys, but just not ?; more data, please. –  msw Jun 15 '10 at 15:00
    
Couldn't test console mode in the VM, how do you do it in Virtualbox?. I have a Brazilian Keyboard layout, it's an HP model (KU-0316). showkey -k shows any keys, just not ?. superuser.com/questions/151463/… –  Somebody still uses you MS-DOS Jun 16 '10 at 12:13

2 Answers 2

From archlinux wiki:

Check for scancodes

If a key does not have a keycode you can know if it has a scancode by looking at the kernel log using the dmesg command:

$ dmesg|tail -5

If when you press the key something like that appears:

atkbd.c: Unknown key pressed (translated set 2, code 0xf1 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e071 <keycode>' to make it known.

then your key has a scancode which can be mapped to a keycode. See Map scancodes to keycodes.

If nothing new appears in dmesg then your key does not have a scancode, which means that it is not recognized by the kernel and cannot be used.

share|improve this answer
up vote 1 down vote accepted

I give up.

I'm going to buy a new keyboard. $10 for my sanity. I've already learned a bunch of xmodmap concepts and such.

share|improve this answer
    
Did you see the answer above? –  Udi Mar 14 '13 at 18:13
    
Yep. But I don't even have that Virtual Machine anymore, so it's not worth the hassle and I can't test your solution (although "If nothing new appears in dmesg then your key does not have a scancode, which means that it is not recognized by the kernel and cannot be used.", I only mark as accepted if I can test for sure). But thanks for passing by, your post may me useful for someone! +1 –  Somebody still uses you MS-DOS Apr 18 '13 at 4:02

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.