lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2011/1/31 Steve Litt :
> I'm all over this like a squirrel on a tree. This is excellent. But I own no
> joystick. How would I make this work with my scroll mouse instead? Would I
> just change
>
> int fd = openDevice( argc == 2 ? strdup(argv[1]) : "/dev/input/js0" );
>
> to something else? Using tail -f I couldn't read anything off of
> /dev/input/mouse0.
>

Really glad you like it.

I dont think that's so simple, I think it'll work only if you give it
a joystick device. The docs I used to craft the joystick querying
part is here: http://www.mjmwired.net/kernel/Documentation/input/joystick-api.txt
. Maybe you'll find something relevant to mouse support there.

-- 
http://www.twitter.com/lfzawacki
http://www.linesocode.wordpress.com