From 4c1482202957828a37e88e42c49e9ac8ef12c960 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 13 Oct 2015 18:20:34 +0200 Subject: keymap: Recognize KEY_* aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit linux/input.h contains alias definitions like #define KEY_COFFEE 152 #define KEY_SCREENLOCK KEY_COFFEE #define KEY_ROTATE_DISPLAY 153 #define KEY_DIRECTION KEY_ROTATE_DISPLAY But we ignored these when building keyboard-keys-list.txt. Also allow the value to start with "K" now (for KEY_*), and drop the hardcoded COFFEE → SCREENLOCK aliasing. This fixes assignments to key "direction". Fixes #1151 --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 8646e55450..e3e07b8c7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3483,7 +3483,7 @@ noinst_LTLIBRARIES += \ src/udev/keyboard-keys-list.txt: $(AM_V_at)$(MKDIR_P) $(dir $@) - $(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_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@ src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@ -- cgit v1.2.3-54-g00ecf