[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X generating Alt keypresses by itself?



Hi all,

I have a problem but I don't know which package to report a bug against.

All my applications are getting KeyPressed and KeyReleased events for
the Alt key a few times a minute, as if I am pressing the Alt key. But I
am not. For most Gnome applications this doesn't matter much, but KDE
applications and OpenOffice.org become pretty much unusable because the
Alt key focuses or opens the "file" menu.

I have logged the events using xev and evtest. See the output below. xev
sees KeyPress and KeyRelease events coming in. Note the times, the
KeyPress and KeyRelease happen in the same microsecond. evtest sees no
such keypresses on my keyboard so it's not a hardware problem. To
triple-check that I have tested with three different keyboards. To
different Dell USB keyboards and a Logitech PS/2 keyboard. I get "ghost"
Alt keypresses on all of them.

Can you help me debug this issue?

Below is the output of both xev and evtest at the same time. I have
placed comments inside then, prefixed by a #. As you can see, xev sees
keypresses from my Alt key, but evtest sees no such keypresses on my
keyboard.

Output from evtest:
# This is the return key I pressed at the end of the evtest command
Event: time 1223560917.470807, type 4 (Misc), code 4 (ScanCode), value 70028
Event: time 1223560917.470822, type 1 (Key), code 28 (Enter), value 0
Event: time 1223560917.470827, -------------- Report Sync ------------

# Here I press the return key after the xev command
Event: time 1223560925.727112, type 4 (Misc), code 4 (ScanCode), value 70028
Event: time 1223560925.727128, type 1 (Key), code 28 (Enter), value 1
Event: time 1223560925.727131, -------------- Report Sync ------------

# Here I release the Return key
Event: time 1223560925.791107, type 4 (Misc), code 4 (ScanCode), value 70028
Event: time 1223560925.791117, type 1 (Key), code 28 (Enter), value 0
Event: time 1223560925.791120, -------------- Report Sync ------------

# Here I press the Alt key manually
Event: time 1223560933.551375, type 4 (Misc), code 4 (ScanCode), value 700e2
Event: time 1223560933.551390, type 1 (Key), code 56 (LeftAlt), value 1
Event: time 1223560933.551396, -------------- Report Sync ------------

# And I release it again
Event: time 1223560933.591374, type 4 (Misc), code 4 (ScanCode), value 700e2
Event: time 1223560933.591390, type 1 (Key), code 56 (LeftAlt), value 0
Event: time 1223560933.591395, -------------- Report Sync ------------

# These two events are Ctrl+C to stop evtest
Event: time 1223560994.921512, type 4 (Misc), code 4 (ScanCode), value 700e0
Event: time 1223560995.601624, type 1 (Key), code 29 (LeftControl), value 2
Event: time 1223560995.601630, -------------- Report Sync ------------
Event: time 1223560995.617513, type 4 (Misc), code 4 (ScanCode), value 70006
Event: time 1223560995.617522, type 1 (Key), code 46 (C), value 1
Event: time 1223560995.617525, -------------- Report Sync ------------


Below is the output from xev, at the exact same time as the evtest was run:

# I manually press Alt
KeyPress event, serial 31, synthetic NO, window 0x3e00001,
    root 0x7f, subw 0x0, time 23255142, (829,-42), root:(839,23),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

# I release Alt again
KeyRelease event, serial 34, synthetic NO, window 0x3e00001,
    root 0x7f, subw 0x0, time 23255195, (829,-42), root:(839,23),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

# This is a "ghost" Alt keypress. I didn't press anything
KeyPress event, serial 34, synthetic NO, window 0x3e00001,
    root 0x7f, subw 0x0, time 23270460, (829,-42), root:(839,23),
    state 0x10, keycode 113 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

# Here the "ghost" Alt is released. Note the time. The keypress and
# key release are instantaneously
KeyRelease event, serial 34, synthetic NO, window 0x3e00001,
    root 0x7f, subw 0x0, time 23270460, (829,-42), root:(839,23),
    state 0x18, keycode 113 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

# Here is another "ghost" Alt keypress and release
KeyPress event, serial 34, synthetic NO, window 0x3e00001,
    root 0x7f, subw 0x0, time 23300464, (829,-42), root:(839,23),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x3e00001,
    root 0x7f, subw 0x0, time 23300464, (829,-42), root:(839,23),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

# These events are when I click my mouse on the (X) to stop xev
ConfigureNotify event, serial 34, synthetic NO, window 0x3e00001,
    event 0x3e00001, window 0x3e00001, (8,63), width 178, height 178,
    border_width 2, above 0x3a06523, override NO

ClientMessage event, serial 34, synthetic YES, window 0x3e00001,
    message_type 0x122 (WM_PROTOCOLS), format 32, message 0x120
(WM_DELETE_WINDOW)

-- 
Sander Marechal


Reply to: