Using ioctl to read mice inputs


 
Thread Tools Search this Thread
Top Forums Programming Using ioctl to read mice inputs
# 1  
Old 01-22-2009
Using ioctl to read mice inputs

I was wondering if its possible to read mouse inputs using ioctl functions somehow ? If it is not too much of trouble can anyone write or even direct me to sample code of ioctl reading someother HID.
# 2  
Old 01-29-2009
Usually, mice are serial devices (or USB serial) devices. If you're not doing device driver work, then just reading from the serial device using read() usually gets the data you're looking for. Translating that data is a matter of knowing the packet specification.
# 3  
Old 01-29-2009
What OS are you using?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read variable inputs

I am trying to make an interactive script. Only problem my inputs are not read and correctly channeled. Please help: Here is my code #!/bin/sh PATHSCRIPT=/home/pp/tmp #if ; then # echo "Syntax : $0 input off lat sample" # exit 1 # fi echo "Choice of Graph" echo "1 -- Type... (5 Replies)
Discussion started by: newkid.7955
5 Replies

2. Solaris

fssnap ioctl error

For some reason when I try to take a snapshot of the root slice on a particular machine I get an ioctl 22 error. I can't seem to find much on the problem by searching the internet other than some realtime processes such as ntp that use mlock can cause this to happen. I tried running it with truss... (2 Replies)
Discussion started by: ilikecows
2 Replies

3. UNIX for Dummies Questions & Answers

can't pair BT keyboard/mice

hello, i can't pair BT keyboard and mice under OS X leopard 10.5.7 installed on pc hardware using ipc osx86 10.5.6 final dvd. I could not find any answers on the web, nor on the osx86 forums, so i figured out maybe ill try my luck on linux/unix forum, after all from what i know os x is basicly a... (0 Replies)
Discussion started by: baron_harkonnen
0 Replies

4. UNIX for Advanced & Expert Users

ioctl : strace

Hi All, int ioctl(int d, int request, ...); Can somebody tell me how does ioctl decides the input parameter: "request". Sometimes, its SNDCTL_TMR_TIMEBASE or TCGETS or FIONREAD...etc. What is the pattern?? I am asking this coz my strace returns this: ... (1 Reply)
Discussion started by: angad.makkar
1 Replies

5. Shell Programming and Scripting

How to read inputs from a file

Hello; Please I need to read inputs from a file change 1 or 2 things the output to another file. (1 Reply)
Discussion started by: jimoney
1 Replies

6. Shell Programming and Scripting

read several inputs and if none input set to 9999

need a script that goes something like this #!/usr/bin/bash echo "input up to TEN values, separated by spaces" read vari1 vari2 vari3 vari4 vari5 vari6 vari7 vari8 vari9 vari10 #set null variables to 9999 (somehow?) #now echo all variables echo $vari1 $vari2 $vari3 $vari4 $vari5 $vari6... (1 Reply)
Discussion started by: ajp7701
1 Replies

7. Programming

How to read terminal attributes using ioctl()

I want to get the terminal attributes such as , terminal width terminal height current cursor position Can I use ioctl function. Please help me how to use this function to get these details.. If possible please explain with a sample code. I'm very new to UNIX progrmming.... Thanks... (1 Reply)
Discussion started by: Sreejesh.S
1 Replies

8. Shell Programming and Scripting

read n number of inputs

Hello, I think its a sinple query but somehow i m stucked up here... I am trying to enter n number of inputs from the user and write them in an input file ie row wise... I tried standard commands like $echo "enter the inputs for the file" $read var1 var2 var3 var4 test1 test2... (14 Replies)
Discussion started by: er_aparna
14 Replies

9. Programming

ioctl()

UNIX, gnu cc compiler, SUN Ultra 60 Hello, this is my first post, so please bear with me. I'm currently developing a test environment for a network subsystem that, when live, accesses databases and other network elements. However, my test environment will be run offline, so I need to fake... (4 Replies)
Discussion started by: j_t_kim
4 Replies

10. UNIX for Dummies Questions & Answers

My Linux is afraid of mice

Okay here's the lowdown: I try Linux out and I think it kicks ass. But I can't use my little scrolli-bobber middle mouse button that I have become so attached to. So I try to just select some random 3-button mouse config from 'kontrol-panel' in KDE and reboot (stupid, STUPID move). Now I can't... (2 Replies)
Discussion started by: Orikal
2 Replies
Login or Register to Ask a Question