Rémi Denis-Courmont schrieb:
> On Thursday 28 January 2010 11:53:13 ext Stefan Iwanowitsch, you wrote:
>   
>>> If you just want to see keyboard input, then you'd open the corresponding
>>> file(s) in /dev/input/.
>>>       
>> Can I read from /dev/input without interfering with other consumers?
>>     
>
> It should work yes.
>
>   
>> And do you happen to know, where I can find specs
>> on the input device files?
>>     
>
> /sys/class/input provides informations on each entries.
>
> The protocol is documented in Documentation/input/ in the kernel sources:
>
> |  You can use blocking and nonblocking reads, also select() on the
> | /dev/input/eventX devices, and you'll always get a whole number of input
> | events on a read. Their layout is:
> |
> | struct input_event {
> |         struct timeval time;
> |         unsigned short type;
> |         unsigned short code;
> |         unsigned int value;
> | };
> |
> |   'time' is the timestamp, it returns the time at which the event happened.
> | Type is for example EV_REL for relative moment, EV_KEY for a keypress or
> | release. More types are defined in include/linux/input.h.
> |
> |   'code' is event code, for example REL_X or KEY_BACKSPACE, again a complete
> | list is in include/linux/input.h.
> |
> |   'value' is the value the event carries. Either a relative change for
> | EV_REL, absolute new value for EV_ABS (joysticks ...), or 0 for EV_KEY for
> | release, 1 for keypress and 2 for autorepeat.
>
>   
I set up some testcode to check the /dev/input/* files but I didn't read
a single byte from them.
Does this work with scratchbox?
Thanks for your help!


_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to