cleitonsouza01 / logkeys

Automatically exported from code.google.com/p/logkeys
Other
0 stars 0 forks source link

keyboard device sometimes unrecognized #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In some instances, the line

 "grep Name /proc/bus/input/devices | grep -nE '[Kk]eyboard|kbd'"

doesn't produce any result, and the parsed int becomes -1, and input device
/dev/input/event-1, which doesn't exist.

This happens when keyboard device doesn't include '[Kk]eyboard|kbd' in its
name, namely some USB hubs.

In the attached devices file, the keyboard device is /dev/input/event4.
Keyboard brand and model:
http://www.enermaxusa.com/catalog/product_info.php?cPath=28_48&products_id=156

Proposed fix:

If the parsed int is -1 (kbd not yet found), search the output for 'HID' ?

  "grep Name /proc/bus/input/devices | grep -nE 'HID'"

Original issue reported on code.google.com by kernc...@gmail.com on 9 May 2010 at 9:42

Attachments:

GoogleCodeExporter commented 9 years ago
Added in r43.

Original comment by kernc...@gmail.com on 1 Jun 2010 at 10:27