findkeyboards revision 3e2147858f21943d5f4a781c60f33ac22c6096ed
# Find "real" keyboard devices and print their device path.
# Author: Martin Pitt <martin.pitt@ubuntu.com>
#
# Copyright (C) 2009, Canonical Ltd.
#
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# returns OK if $1 contains $2
[ "${1#*$2*}" != "$1" ]
}
# returns OK if $1 contains $2 at the beginning
[ "${1#$2*}" != "$1" ]
}
return 1;
}
# print a list of input devices which are keyboard-like
# standard AT keyboard
# filter out non-event devices, such as the parent input devices which have no devnode
continue
fi
echo -n 'AT keyboard: '
echo -n 'USB keyboard: '
else
echo -n 'Unknown type: '
fi
done
# modules
module=$(udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='*Extra Buttons')
echo -n 'module: '
fi
done
done
}