mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-11-23 23:10:57 +07:00
udev: add BTN_ key codes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
fc9050ca28
commit
b12d30e7d2
@ -114,10 +114,10 @@ nodist_libudev_core_la_SOURCES = \
|
|||||||
|
|
||||||
keyboard-keys.txt: Makefile
|
keyboard-keys.txt: Makefile
|
||||||
$(AM_V_at)f="$@"; case $$f in */*) $(MKDIR_P) "$${f%/*}"; esac
|
$(AM_V_at)f="$@"; case $$f in */*) $(MKDIR_P) "$${f%/*}"; esac
|
||||||
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
|
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+(KEY|BTN)_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
|
||||||
|
|
||||||
keyboard-keys-from-name.gperf: keyboard-keys.txt Makefile
|
keyboard-keys-from-name.gperf: keyboard-keys.txt Makefile
|
||||||
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' keyboard-keys.txt > $@
|
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} /^BTN_/{ print tolower($$1) ", " $$1 } !/^BTN_/{ print tolower(substr($$1 ,5)) ", " $$1 }' keyboard-keys.txt > $@
|
||||||
|
|
||||||
keyboard-keys-from-name.h: keyboard-keys-from-name.gperf Makefile
|
keyboard-keys-from-name.h: keyboard-keys-from-name.gperf Makefile
|
||||||
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < keyboard-keys-from-name.gperf > $@
|
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < keyboard-keys-from-name.gperf > $@
|
||||||
|
Loading…
Reference in New Issue
Block a user