Update instructions for Generating uinputmapper/uinput_gen.py

This commit is contained in:
moparisthebest 2014-08-14 12:28:23 -04:00
parent aced80c40d
commit 61cd9779d5
1 changed files with 2 additions and 2 deletions

View File

@ -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 <linux/input.h>" ; 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 <linux/input.h>" ; 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