File: input_map.sh

package info (click to toggle)
lirc 0.9.0~pre1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,844 kB
  • sloc: ansic: 44,120; sh: 11,159; makefile: 430; python: 108; perl: 106
file content (9 lines) | stat: -rwxr-xr-x 229 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
#! /bin/sh

TYPES="KEY BTN"
file=${1:-/usr/include/linux/input.h}

for type in $TYPES; do
	grep "^#define ${type}_" < $file|sort|sed -n --expression="s/^#define \([^ 	]*\)[ 	][ 	]*\([0-9][0-9a-fA-FxX]*\).*/{\"\1\", \2},/p"
done