Commit 892f04f1 authored by Jeff Zohrab's avatar Jeff Zohrab

Recognize Logitech K7570 keyboard.

The usual keyboard event bitmask is 120013, but Logitech and some
other keyboards have 12001F.  Using both F and f as grep case-insensitivity
flag may vary across systems.
parent 3aea01f9
...@@ -332,7 +332,7 @@ void determine_input_device() ...@@ -332,7 +332,7 @@ void determine_input_device()
// extract input number from /proc/bus/input/devices (I don't know how to do it better. If you have an idea, please let me know.) // extract input number from /proc/bus/input/devices (I don't know how to do it better. If you have an idea, please let me know.)
// The compiler automatically concatenates these adjacent strings to a single string. // The compiler automatically concatenates these adjacent strings to a single string.
const char* cmd = EXE_GREP " -E 'Handlers|EV=' /proc/bus/input/devices | " const char* cmd = EXE_GREP " -E 'Handlers|EV=' /proc/bus/input/devices | "
EXE_GREP " -B1 'EV=120013' | " EXE_GREP " -B1 'EV=12001[3Ff]' | "
EXE_GREP " -Eo 'event[0-9]+' "; EXE_GREP " -Eo 'event[0-9]+' ";
std::stringstream output(execute(cmd)); std::stringstream output(execute(cmd));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment