Linux::Input 1.02
Sponsored Links
Linux::Input 1.02 Ranking & Summary
File size:
0.006 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1016
Date added:
2007-01-25
Publisher:
John Beppu
Linux::Input 1.02 description
Linux::Input is a Linux input event interface.
SYNOPSIS
Example: 1 joystick using event API
my $js1 = Linux::Input->new(/dev/input/event3);
while (1) {
while (my @events = $js1->poll(0.01)) {
foreach (@event) {
}
}
}
Example: 2 joysticks using joystick API (different event structure)
my $js1 = Linux::Input::Joystick->new(/dev/input/js0);
my $js2 = Linux::Input::Joystick->new(/dev/input/js1);
my $selector = IO::Select->new();
$selector->add($js1->fh);
$selector->add($js2->fh);
while (my $fh = $selector->can_read) {
my @event;
if ($fh == $js1->fh) {
@event = $js1->poll()
} elsif ($fh == $js2->fh) {
@event = $js2->poll()
}
foreach (@event) {
# work
}
}
Example 3: monitor all input devices
use File::Basename qw(basename);
my @inputs = map { "/dev/input/" . basename($_) }
/sys> ;
my @dev;
my $selector = IO::Select->new();
foreach (@inputs) {
my $device = Linux::Input->new($_);
$selector->add($device->fh);
push @dev, $device;
}
while (my $fh = $selector->can_read) {
# work
}
Example 4: testing for events on the command line
# information on what event queue belongs to what device
cat /proc/bus/input/devices
# verify that events are coming in
sudo evtest.pl /dev/input/event*
SYNOPSIS
Example: 1 joystick using event API
my $js1 = Linux::Input->new(/dev/input/event3);
while (1) {
while (my @events = $js1->poll(0.01)) {
foreach (@event) {
}
}
}
Example: 2 joysticks using joystick API (different event structure)
my $js1 = Linux::Input::Joystick->new(/dev/input/js0);
my $js2 = Linux::Input::Joystick->new(/dev/input/js1);
my $selector = IO::Select->new();
$selector->add($js1->fh);
$selector->add($js2->fh);
while (my $fh = $selector->can_read) {
my @event;
if ($fh == $js1->fh) {
@event = $js1->poll()
} elsif ($fh == $js2->fh) {
@event = $js2->poll()
}
foreach (@event) {
# work
}
}
Example 3: monitor all input devices
use File::Basename qw(basename);
my @inputs = map { "/dev/input/" . basename($_) }
/sys> ;
my @dev;
my $selector = IO::Select->new();
foreach (@inputs) {
my $device = Linux::Input->new($_);
$selector->add($device->fh);
push @dev, $device;
}
while (my $fh = $selector->can_read) {
# work
}
Example 4: testing for events on the command line
# information on what event queue belongs to what device
cat /proc/bus/input/devices
# verify that events are coming in
sudo evtest.pl /dev/input/event*
Linux::Input 1.02 Screenshot
Linux::Input 1.02 Keywords
Input 1.02
linux input event
input event
event interface
event
FH
new
input
1.02
linux
Linux::Input
LinuxInput
Linux::Input 1.02
Libraries
Programming
Bookmark Linux::Input 1.02
Linux::Input 1.02 Copyright
WareSeeker periodically updates pricing and software information of Linux::Input 1.02 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Linux::Input 1.02 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
Linux::Input::Joystick is a joystick-specific interface for Linux 2.2+ Free Download
iPup is a simplified build of Puppy Linux for use in institutional settings. Free Download
Linux distribution race is a cool car race for 4 players. Free Download
EKG is a simple yet powerful key Free Download
Linux Commander is a file manager for X11 using GTK+. Free Download
Gain access to NTFS partitions under Linux Free Download
Swinput can fake a mouse and a keyboard by using the Linux Input System. Free Download
Fixes linux partition corruption and restore linux data on linux platform by using Recover Data for Linux on Linux data recovery tool. Software successfully runs on linux os and retrieve linux files in linux platform to get back linux data instantly. Free Download
Latest Software
Popular Software
Favourite Software