From 61cd9779d5764d07c5afa17427cd5180e320011a Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Thu, 14 Aug 2014 12:28:23 -0400 Subject: [PATCH] Update instructions for Generating uinputmapper/uinput_gen.py --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 1afc6e2..d6c9afa 100644 --- a/README.rst +++ b/README.rst @@ -37,6 +37,6 @@ Included in uinput-mapper ; may be split later Development notes ================= -Generating gen.py: +Generating uinputmapper/uinput_gen.py: - gcc -E -dM /usr/include/linux/input.h | egrep ' (EV|SYN|KEY|BTN|REL|ABS|MSC|LED|SND|REP|SW)_[A-Za-z0-9_]+' | ( echo "#include " ; echo "input_constants_dict = {" ; sed -r 's/[^ ]+ +([^ ]+).*/"\1" : \1,/' ; echo "}" ) | gcc -E -o /dev/stdout - | grep 'input_constants_dict = {' -A 100000 > gen.py + gcc -E -dM /usr/include/linux/input.h | egrep ' (EV|SYN|KEY|BTN|REL|ABS|MSC|LED|SND|REP|SW)_[A-Za-z0-9_]+' | ( echo "#include " ; echo "input_constants_dict = {" ; awk '{print "\""$2"\" : " $3","}' ; echo "}" ) | gcc -E -o /dev/stdout - | awk '{ if ($0 == "input_constants_dict = {") pit=1; if (pit == 1) print $0; }' > uinputmapper/uinput_gen.py