mirror of
https://github.com/moparisthebest/uinput-mapper
synced 2024-11-26 01:12:14 -05:00
Update instructions for Generating uinputmapper/uinput_gen.py
This commit is contained in:
parent
aced80c40d
commit
61cd9779d5
@ -37,6 +37,6 @@ Included in uinput-mapper ; may be split later
|
|||||||
Development notes
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user