Lines 284-293
splash_start() {
Link Here
|
284 |
if [[ -z "${t}" ]]; then |
284 |
if [[ -z "${t}" ]]; then |
285 |
t=$(grep -Hsi keyboard /sys/class/input/event*/device/driver/description | grep -o 'event[0-9]\+') |
285 |
t=$(grep -Hsi keyboard /sys/class/input/event*/device/driver/description | grep -o 'event[0-9]\+') |
286 |
if [[ -z "${t}" ]]; then |
286 |
if [[ -z "${t}" ]]; then |
287 |
# Try an alternative method of finding the event device. The idea comes |
287 |
for i in /sys/class/input/input* ; do |
288 |
# from Bombadil <bombadil(at)h3c.de>. We're couting on the keyboard controller |
288 |
if [ "$((0x$(cat $i/capabilities/ev) & 0x100002))" = "1048578" ]; then |
289 |
# being the first device handled by kbd listed in input/devices. |
289 |
t=$(echo $i | sed -e 's#.*input\\([0-9]*\\)#event\\1#') |
290 |
t=$(/bin/grep -s -m 1 '^H: Handlers=kbd' /proc/bus/input/devices | grep -o 'event[0-9]*') |
290 |
fi |
|
|
291 |
done |
292 |
|
293 |
if [[ -z "${t}" ]]; then |
294 |
# Try an alternative method of finding the event device. The idea comes |
295 |
# from Bombadil <bombadil(at)h3c.de>. We're couting on the keyboard controller |
296 |
# being the first device handled by kbd listed in input/devices. |
297 |
t=$(/bin/grep -s -m 1 '^H: Handlers=kbd' /proc/bus/input/devices | grep -o 'event[0-9]*') |
298 |
fi |
291 |
fi |
299 |
fi |
292 |
fi |
300 |
fi |
293 |
[[ -n "${t}" ]] && splash_comm_send "set event dev /dev/input/${t}" |
301 |
[[ -n "${t}" ]] && splash_comm_send "set event dev /dev/input/${t}" |