logkeys icon indicating copy to clipboard operation
logkeys copied to clipboard

logkeys: Error opening input event device '': No such file or directory

Open deekshith1410 opened this issue 9 years ago • 6 comments

"sudo logkeys --start --output filename.log" is giving this error

deekshith1410 avatar Apr 22 '16 13:04 deekshith1410

Please attach your /proc/bus/input/devices.

kernc avatar Apr 22 '16 13:04 kernc

devices.txt

deekshith1410 avatar Apr 22 '16 14:04 deekshith1410

It says, logkeys: Error opening input event device ' ' : No such file or directory why would event device null?

deekshith1410 avatar Apr 22 '16 14:04 deekshith1410

That error is this line in the code: https://github.com/kernc/logkeys/blob/master/src/logkeys.cc#L431

The device is found by grepping the file you supplied, https://github.com/kernc/logkeys/blob/master/src/logkeys.cc#L335, but that regex should have matched on the line in your attached file that says EV=120013, and then there's another regex.

@kernc - would the regex not have found the Handlers line in the file, Handlers=sysrq kbd event3 leds ?

jzohrab avatar Apr 22 '16 16:04 jzohrab

$ command grep -E 'Handlers|EV=' /tmp/devices.txt |
      command grep -B1 'EV=1[02]001[3Ff]' | 
      command grep -Eo 'event[0-9]+' 
event3

I believe it should.

Does returning string like that work with all compiler flags?

kernc avatar Apr 24 '16 16:04 kernc

It ought to, but I can't say for sure for all compilers.

jzohrab avatar Apr 24 '16 16:04 jzohrab