Linux::Input::Info - get information about /dev/input/event* devices under Linux
use Linux::Input::Info qw(:all); # optionally export EV_* constants for (0..32) { my $i = Linux::Input::Info->new($_); printf "/dev/input/event%d\n", $_; printf "\tbustype : %s\n", $i->bustype; printf "\tvendor : 0x%x\n", $i->vendor; printf "\tproduct : 0x%x\n", $i->product; printf "\tversion : %d\n", $i->version; printf "\tname : %s\n", $i->name; printf "\tuniq : %s\n", $i->uniq; printf "\tphys : %s\n", $i->phys; printf "\tbits ev :"; printf " %s", $i->ev_name($_) for $i->bits; printf "\n"; }
Returns undef if the device does not exist.
get the bus type
get vendor id
get the product id
get driver version
get device name
get unique identifier
get physical location
get event bits
map event bit to event name
Make sure it doesn't leak memory.
Simon Wistow <simon@thegestalt.org>
Copyright 2005, Simon Wistow
Linux::Input
Gerd Knorr's input utils - http://dl.bytesex.org/cvs-snapshots/
To install Linux::Input::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::Input::Info
CPAN shell
perl -MCPAN -e shell install Linux::Input::Info
For more information on module installation, please visit the detailed CPAN module installation guide.