kernc / kernc/logkeys

logkeys doesn't log everything sent if keys are sent in fast bursts (by hardware)

Open
#65 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
C++
Stars
834
Forks
254
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?
1. Program a USB device ( a Teensy++2.0 from www.pjrc.com) that emulates a USB
keyboard, but which doesn't require a human to actually press the keys.
2. Plug in the USB device, and have it send a fast burst of data via the
keyboard input.
3. The data is not logged by logkeys, but is detected by the active window.

What is the expected output?
All of the data sent via the keyboard input should be captured by logkeys, even
if it is sent in fast bursts.

What do you see instead?
I see the human entered text before and after where the machine-generated text
should appear, but not the machine-generated burst of characters

What version of the product are you using (`logkeys --help`)?
0.1.0

On what operating system?
Ubuntu 11.04

Other info:

$ uname -a
Linux asus-eeepc 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011
i686 i686 i386 GNU/Linux

$ /proc/bus/input/devices
I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input0
U: Uniq=
H: Handlers=event0
B: PROP=0
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=4000 0 0 0 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
U: Uniq=
H: Handlers=kbd event3
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input4
U: Uniq=
H: Handlers=sysrq kbd event4
B: PROP=0
B: EV=120013
B: KEY=4 2000000 3803078 f800d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input5
U: Uniq=
H: Handlers=kbd event5
B: PROP=0
B: EV=3
B: KEY=3e000b 0 0 0 0 0 0 0

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="Asus EeePC extra buttons"
P: Phys=eeepc/input0
S: Sysfs=/devices/platform/eeepc/input/input6
U: Uniq=
H: Handlers=rfkill kbd event6
B: PROP=0
B: EV=13
B: KEY=100000 0 0 0 21400b 400 1800000 1300000 e0000 0 0 0
B: MSC=10

I: Bus=0011 Vendor=0002 Product=000e Version=0000
N: Name="ETPS/2 Elantech Touchpad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input7
U: Uniq=
H: Handlers=mouse0 event7
B: PROP=0
B: EV=b
B: KEY=e420 0 30000 0 0 0 0 0 0 0 0
B: ABS=f0003

I: Bus=0003 Vendor=04f2 Product=b071 Version=1518
N: Name="CNF7129"
P: Phys=usb-0000:00:1d.7-8/button
S: Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.0/input/input8
U: Uniq=
H: Handlers=kbd event8
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel Mic"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input9
U: Uniq=
H: Handlers=event9
B: PROP=0
B: EV=21
B: SW=10

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel Headphone"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input10
U: Uniq=
H: Handlers=event10
B: PROP=0
B: EV=21
B: SW=4

I: Bus=0003 Vendor=1bcf Product=0007 Version=0110
N: Name="USB Optical Mouse"
P: Phys=usb-0000:00:1d.7-3.4/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.4/1-3.4:1.0/input/input11
U: Uniq=
H: Handlers=mouse1 event11
B: PROP=0
B: EV=1f
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=143
B: ABS=100 0
B: MSC=10

I: Bus=0003 Vendor=16c0 Product=0482 Version=0111
N: Name="Teensy Keyboard/Mouse/Joystick"
P: Phys=usb-0000:00:1d.7-3.2/input0
S:
Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.2/1-3.2:1.0/input/input155
U: Uniq=
H: Handlers=sysrq kbd event12
B: PROP=0
B: EV=120013
B: KEY=800000 0 e0b0ffdf 1cfffff ffffffff fffffffe
B: MSC=10
B: LED=1f

I: Bus=0003 Vendor=16c0 Product=0482 Version=0111
N: Name="Teensy Keyboard/Mouse/Joystick"
P: Phys=usb-0000:00:1d.7-3.2/input1
S:
Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.2/1-3.2:1.1/input/input156
U: Uniq=
H: Handlers=mouse2 event13
B: PROP=0
B: EV=17
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103
B: MSC=10

I: Bus=0003 Vendor=16c0 Product=0482 Version=0111
N: Name="Teensy Keyboard/Mouse/Joystick"
P: Phys=usb-0000:00:1d.7-3.2/input3
S:
Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.2/1-3.2:1.3/input/input157
U: Uniq=
H: Handlers=event14 js0
B: PROP=0
B: EV=1b
B: KEY=ffff0000 0 0 0 0 0 0 0 0 0 0 0 0 ffff 0 0 0 0 0 0 0 0 0
B: ABS=300e7
B: MSC=10

```

Original issue reported on code.google.com by `colm.p.o...@gmail.com` on 31 Jul 2011 at 9:58

Contributor guide

No contributing guide indexed for this repository

Research direction

The report names no source files or tests. Reproduce the failure with the Teensy keyboard device on Ubuntu and inspect the keyboard input-event handling; done means every character from a fast burst is captured by logkeys, matching the active window.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.