View Single Post
JayOnThaBeat's Avatar
Posts: 1,028 | Thanked: 578 times | Joined on Mar 2009 @ Chicago
#130
Originally Posted by Benson View Post
Here's a script; plug the mouse in, run this:
Code:
#!/bin/sh
killall evrouter mouse_poll
rm /tmp/.evrouter\:0.0
for devfile in /dev/input/event*; do
  sudo /bin/chmod a+r $devfile
done 
mouse_poll `evrouter /dev/input/event* |head -6 | grep Mouse| cut -d: -f2`&
while [ "x`grep Mouse  /proc/bus/input/devices`" != x ]; do
  sleep 10
done
killall evrouter mouse_poll
It cleans things up, runs the mouse_poll and evrouter to transfer motion and clicks, respectively, and waits until the mouse is unplugged, then it exits. You could easily make it loop forever, restarting the programs when the mouse shows back up, but I'm leaving it manually started for the moment.

You'll need to add /bin/chmod a+r /dev/input/event* in sudoers, like:
Code:
user ALL = NOPASSWD: /bin/chmod a+r /dev/input/event*
You'll also need evrouter and mouse_poll themselves; source for both was linked early in this thread, but I'm going to attach binaries. I don't know that they will work; they may need libraries not installed by default. If anyone gets them to work, please reply here. They are reported to work, so have at it.

If you build from source, apt-get install:
  • gcc
  • make
  • libc-dev
  • libx11-dev
  • libxt-dev
  • libxtst-dev
Install the binaries somewhere on the path / make the path point to the binaries.

Making the cursor visible is easy; install an alternate theme, or use the fallback non-themed cursors by commenting the line in /home/user/.icons/default/index.theme:
Code:
[Icon Theme]
#Inherits=xcursor-transparent
Then reboot, for it to take effect.
@Benson (really, anybody who knows)

Using the Gaegle search (as I have named it ) I found a thread about gamepads that lead me to this post.

My question is, how does this need to be modified to work for a usb gamepad?

I just got my usb otg cable, and I'm hoping to be able to hook my gamepad up to my n810.

TIA

///EDIT

theres an attachment of EVROUTER in the original post fyi
__________________
maemo.org search
I AM NOT A ROLE-MODEL.