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
Original issue reported on code.google.com by
kernc...@gmail.com
on 9 May 2010 at 9:42Attachments: