Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have somehow managed to get my keyboard only to work and be able to select with the mouse cursor, only when the Shift and Control keys are held. How can I undo this? I have tried System -> Preferences -> Keyboard but nothing appears there to resolve this.


I can only enter text or select anything (even opening a new tab in web browser), only if the shift and control keys are held. once the selection is "active" then I can type normally, until the next time I need to type, etc.. Below as recommended:

KeyRelease event, serial 36, synthetic NO, window 0x5a00001,
root 0x1ad, subw 0x0, time 2238759, (-435,502), root:(312,552),
state 0x11, keycode 38 (keysym 0x41, A), same_screen YES,
XLookupString gives 1 bytes: (41) "A"
XFilterEvent returns: False


Pressing (and holding) the Alt or Windows key has a similar action as to holding the Shift and Control keys (Shift and Control are held simultaneously).

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
share|improve this question
I don't understand what's happening. Do you mean that unless Shift and Ctrl are both held, nothing happens when you press a key? Or that your keyboard acts as if they are both held all the time? Are you still able to type commands into the machine? If you can, run xev and tell us what it displays when you press the A key. – Gilles Mar 12 '11 at 21:47
@Stuck: You can edit your question to add more information; don't write an answer for that. A moderator has converted your answer to a comment, and I've merged it into your question so that the xev output would be more readable. – Gilles Mar 12 '11 at 22:19
@Gilles Adding it to the question was a good idea; I ended up deleting the converted comment since it's useless now – Michael Mrozek Mar 12 '11 at 22:26

It looks like your system believes that you're holding down the mod2 modifier, so try pressing and releasing the corresponding key. Modifiers other than Shift and Ctrl don't have standard assignments, so I can't tell you what the corresponding key is. xmodmap -pm would tell you, but try pressing and releasing the Alt key or the Windows key.

(I'm basing this on state 0x11, which I think means Shift + mod2, but I'm not completely sure that's what it means. But the symptoms do look like a missed key release event.)

Update: The output from xmodmap -pm shows that mod2 is Num Lock, so try toggling Num Lock off.

share|improve this answer

Your Answer


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