* Reading ati_remote keypresses in userland
@ 2004-10-02 13:58 Tony Howat
2004-10-02 18:09 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Tony Howat @ 2004-10-02 13:58 UTC (permalink / raw)
To: linux-kernel
I have an ati_ remote, and the ati_remote module loaded, the 2.2.0 version
with kernel version 2.6.5-1. It works in that I can see data
on /dev/input/mice when I use the mouse type controls on the remote. However
I need to use the keyboardish buttons to control my application.
Having read round it seemed the /dev/input/event devices would be the key. I
put together some code to find the right event device and dump the output
from a linux journal article :
The device on /dev/input/event0 says its name is PS/2 Generic Mouse
The device on /dev/input/event1 says its name is AT Translated Set 2
keyboard
The device on /dev/input/event2 says its name is X10 Wireless Technology Inc
USB Receiver
evdev driver version is 1.0.0
...but there's no output turning up when I read from the file descriptor.
However, running the module in debug mode does give meaningful output to
/var/log/messages :
Sep 28 18:27:44 marmot last message repeated 10 times
Sep 28 18:27:50 marmot kernel: ati_remote 1-2:1.0: channel 0x0f; data d4,0f;
index 16; keycode 4
Sep 28 18:27:51 marmot last message repeated 10 times
Sep 28 18:27:52 marmot kernel: ati_remote 1-2:1.0: channel 0x0f; data dc,17;
index 23; keycode 11
Sep 28 18:27:54 marmot last message repeated 14 times
Sep 28 18:28:19 marmot kernel: ati_remote 1-2:1.0: channel 0x0f; data c8,03;
index 33; keycode 148
I'm a bit confused. Which device should I be looking at for these
keypresses? Am I missing something?
My test code is at http://www.i-r-genius.com/remoteend.c
Could anyone confirm exactly which device these keypresses should turn up on
and the method for reading them?
Thanks for any help.
The aim of this project is to provide a simple control for music player
daemon (http://www.musicpd.org/) without the need for X. I will, of course,
release the code when done.
--
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Reading ati_remote keypresses in userland
2004-10-02 13:58 Reading ati_remote keypresses in userland Tony Howat
@ 2004-10-02 18:09 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2004-10-02 18:09 UTC (permalink / raw)
To: Tony Howat; +Cc: linux-kernel
Hi!
> I have an ati_ remote, and the ati_remote module loaded, the 2.2.0 version
> with kernel version 2.6.5-1. It works in that I can see data
> on /dev/input/mice when I use the mouse type controls on the remote. However
> I need to use the keyboardish buttons to control my application.
>
> Having read round it seemed the /dev/input/event devices would be the key. I
> put together some code to find the right event device and dump the output
> from a linux journal article :
>
> The device on /dev/input/event0 says its name is PS/2 Generic Mouse
> The device on /dev/input/event1 says its name is AT Translated Set 2
> keyboard
> The device on /dev/input/event2 says its name is X10 Wireless Technology Inc
> USB Receiver
> evdev driver version is 1.0.0
>
> ...but there's no output turning up when I read from the file descriptor.
> However, running the module in debug mode does give meaningful output to
> /var/log/messages :
You need to read in slightly special way, see for example evtest.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Reading ati_remote keypresses in userland
@ 2004-10-02 21:18 Tony Howat
0 siblings, 0 replies; 3+ messages in thread
From: Tony Howat @ 2004-10-02 21:18 UTC (permalink / raw)
To: linux-kernel
> The device on /dev/input/event0 says its name is PS/2 Generic Mouse
> The device on /dev/input/event1 says its name is AT Translated Set 2
> keyboard
> The device on /dev/input/event2 says its name is X10 Wireless
> Technology Inc USB Receiver
> evdev driver version is 1.0.0
>
> ...but there's no output turning up when I read from the file descriptor.
Problem solved. Turns out ati_remote was registered twice with input driver,
so the events were actually turning up on /dev/input/event3 rather that 2.
Odd.
Thanks to those who helped.
--
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-02 21:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-02 13:58 Reading ati_remote keypresses in userland Tony Howat
2004-10-02 18:09 ` Pavel Machek
2004-10-02 21:18 Tony Howat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome