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.

I have some problem. Every 3-5 second everything, that I input from keyboard became UPPERCASE only. I also have two keyboard layouts: us and ua. And when uppercase happens - I can't switch my keyboard layout (I use mod4 for switching).

This is my xmodmap output:

$ xmodmap
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

I tried xmodmap -e "clear lock", but uppercase input still periodically turns on. I tried to disable Caps Lock key in "hardware way", putting insulator between keyboard contacts. But I doesn't help.

== Update == For A#1
Look, there is sticky Caps_Lock:

KeyPress event, serial 40, synthetic NO, window 0x2a00001,
    root 0xaa, subw 0x0, time 30893676, (-254,229), root:(384,359),
    state 0x2, keycode 39 (keysym 0x53, S), same_screen YES,
    XLookupString gives 1 bytes: (53) "S"
    XmbLookupString gives 1 bytes: (53) "S"
    XFilterEvent returns: False

What I'm doing? First, I run florence (Virtual Keyoards) and turn off Caps_Lock key. Second, I type: xmodmap -e "clear lock". But it is very dirty hack :), you know. It works for few minutes or few hours.

share|improve this question
add comment

2 Answers 2

Chances are that your Shift key is getting stuck. Try pressing and releasing your Shift key (both, if you have a left and a right key). This is most likely to be a hardware issue if you haven't noticed other keys getting stuck.

When the problem happens, run xterm -e xev (you might want to have an icon or menu entry ready so that you can launch xev with only mouse clicks). When you press a key in the xev window, you'll see output like

KeyPress event, serial 32, synthetic NO, window 0x3000001,
    root 0xa5, subw 0x0, time 201838723, (221,316), root:(232,403),
    state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XmbLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: False

state 0x0 means that there is no modifier. With a Shift modifier down, you'd see state 0x1. The Lock (a.k.a. Caps Lock) modifier is state 0x2; more generally, with several modifiers down, you'll see a bitwise mask of the modifiers (e.g. state 0x5 if you have both Shift (1) and Ctrl (4) down). If the problem persists, tell us how the xev output deviates from what you expect.

share|improve this answer
    
Thanks for trying to help. –  Denys P. Nov 1 '11 at 0:34
add comment
up vote 1 down vote accepted

I plugged in USB keyboard. In GRUB menu I added into kernel string: i8042.nokbd (after quiet).

Also, if you need to turn-off notebook keyboard while working, use xinput.

  • First execute xinput list, than find line with AT Translated Set 2 keyboard.
  • Then xinput list-props 'AT Translated Set 2 keyboard' or using id (14 for example) xinput list-props 14.
  • Find Device Enabled and xinput set-prop 'AT Translated Set 2 keyboard' 'Device Enabled' 0 or using id xinput set-prop 14 134 0.
share|improve this answer
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.