[2ca21d]: daemons / input_map.sh  Maximize  Restore  History

Download this file

17 lines (12 with data), 319 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#! /bin/sh
TYPES="KEY BTN"
file=${1:-/usr/include/linux/input.h}
# Use gnu-sed on Macosx
if test "`uname`" = 'Darwin'; then
SED=gsed
else
SED=sed
fi
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

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks