Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In the middle of today, my F4 key started producing the letter p, without my conscious acting and I can't seem to revert this change. Whenever I press F4, p appears instead. How can I change this back?

Pressing p, xev returns:

KeyPress event, serial 38, synthetic NO, window 0x4400001,
    root 0x150, subw 0x0, time 581565, (696,-17), root:(698,55),
    state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
    XLookupString gives 1 bytes: (70) "p"
    XmbLookupString gives 1 bytes: (70) "p"
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0x150, subw 0x0, time 581605, (696,-17), root:(698,55),
    state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
    XLookupString gives 1 bytes: (70) "p"
    XFilterEvent returns: False

Pressing F4, xev returns:

KeyPress event, serial 38, synthetic NO, window 0x4400001,
    root 0x150, subw 0x0, time 582298, (696,-17), root:(698,55),
    state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
    XLookupString gives 1 bytes: (70) "p"
    XmbLookupString gives 1 bytes: (70) "p"
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0x150, subw 0x0, time 582318, (696,-17), root:(698,55),
    state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
    XLookupString gives 1 bytes: (70) "p"
    XFilterEvent returns: False

As far as I'm concerned, both keys appear to me as one and the same key. Where can I revert or change such low-level behavior?

Update: I plugged in an external keyboard for which F4 works as expected. So... is my keyboard broken?

Update: While in GRUB, before the kernel starts, F4 simply does nothing as opposed to produce a p. To me, this can only mean that it's an OS problem.

Update: In the ttys (1 to 3, 5 and 6 (I can't access the fourth through Ctrl-Alt-F4)), F4 equally produces p.

share|improve this question
    
In a text console, run showkey and press p and F4. What's the output? Also check the kernel logs to see if there's anything keyboard-related. Another thing to check would be to boot from another operating system (e.g. a bootable Linux USB image) and see what F4 does there. –  Gilles Jul 12 '12 at 22:34
    
Same output for both: keycode 25 press keycode 25 release, no matter which of the two keys I press. –  jonny Jul 12 '12 at 22:37
    
I also realised this happens on Windows as well... which exceeds my mind. I will however migrate it to general SO as it's no longer unix-specific. –  jonny Jul 12 '12 at 22:39
    
Unless this is a programmable keyboard, I blame a speck of dust or other contaminant in the keyboard. Try shaking it; or in desperation, wash it and wait several months (yes, it takes very long) for it to dry. –  Gilles Jul 12 '12 at 22:41
    
Tried that and also removed the key and cleaned up below it. However, GRUB treats the key as expected. It thus appears like it would be working initially but then get new behavior through some system driver or something. –  jonny Jul 12 '12 at 22:44
show 2 more comments

1 Answer 1

up vote 2 down vote accepted

It's a long shot, but this can occasionally solve mysterious problems with laptop BIOSes. Switch off the computer, unplug it and remove the battery. Wait a bit, then plug it on. It's possible that some memory used by the BIOS has become corrupted and a complete power cycle will reinitialize it.

share|improve this answer
    
I removed the battery over night and unplugged it and as far as I can tell, everything is back to normal now!! :-) Thanks a lot, this really bothered me! –  jonny Jul 13 '12 at 8:37
add comment

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.