Hi,

due to the lack of other proposals i now come up with something ancient.
If you are still running the X Window System, then there should be a
program named xev.
Start it in a dedicated terminal window which will get its verbous
text output. Redirect a copy of that output to a file:

  xev | tee -i /tmp/xev.log

xev will pop up a small window, of which it will report the received
X events. Among them are input events of keyboard and mouse.
So give this small window the input focus. (I.e. move mouse cursor into
it. Maybe you need to click at it. Whatever your desktop expects.)

You will see a little storm of events like

  PropertyNotify event, serial 8, synthetic NO, window 0x11400001,
      atom 0x27 (WM_NAME), time 382397390, state PropertyNewValue

  ... more window setup events ...

  MotionNotify event, serial 40, synthetic NO, window 0x11400001,
      root 0xa4, subw 0x0, time 382398675, (59,148), root:(390,245),
      state 0x0, is_hint 0, same_screen YES

  ... more mouse events ...

Next take your hands off mouse and keyboard.
At some point - at least for me - xev stops to report new events and i
can make key tests. E.g. i press "Shift" and see

  KeyPress event, serial 40, synthetic NO, window 0x11400001,
      root 0xa4, subw 0x0, time 382860609, (81,134), root:(412,231),
      state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
      XLookupString gives 0 bytes:
      XmbLookupString gives 0 bytes:
      XFilterEvent returns: False

  KeyRelease event, serial 40, synthetic NO, window 0x11400001,
      root 0xa4, subw 0x0, time 382860680, (81,134), root:(412,231),
      state 0x1, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
      XLookupString gives 0 bytes:
      XFilterEvent returns: False

In order to end the program, i put the input focus on the terminal
window, where it reports its events, and press Ctrl+C.

If your suspicion is right, xev should show lots of such Key* events
as soon as its receiver window gets the focus, without you pressing any
key at the keyboard. In that case, end xev and look at the messages
on the terminal window or in file  /tmp/xev.log .


Have a nice day :)

Thomas

Reply via email to