Re: Help regarding the standard keyboard/mouse device entry files

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

 



Hi Daniel / Peter,
Thanks a lot for the quick response.
 
Daniel, Thanks for the clarification. But my requirement is little bit different. I want to check the keyboard and
mouse device whether it is accessed by any means. I mean I want to open the device file and do a stat on that
to check the access time of the file. From the /proc/bus/input/devices and /proc/bus/input/handlers I can find out
the event queue interface basically used by the evdev driver [to check all the events from all the input devices] if I am
not wrong. Is there any way to find out the device interface for the keyboard. Like for mouse it is /dev/input/mice or
/dev/mice for the unified mouse. Hope it is clear now.
 
Please let me know if I am missing anything or find any ambiguity in my explanation.
 
Thanks in advance.
 
Regards,
Santosh

On Thu, Mar 6, 2008 at 5:02 PM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote:
On Thu, Mar 6, 2008 at 2:33 PM, Santosh Pradhan
<santosh.pradhan@xxxxxxxxx> wrote:
> Hi All,
> I want to know the standard device entry files for the keyboard and mouse
> device in linux with both
> 2.4 and 2.6 kernels. Can anybody please help me to find out the device entry
> for both
> devices? I am not able to find any /dev/kbd or /dev/keyboard entry in the
> /dev location.
> But if I do the cat /proc/bus/input/devices (handlers) I can see some
> informations. But there
> are more interfaces for mouse like /dev/input/mouse0, /dev/mice or
> /dev/input/event0 . I am little bit
> confused choosing the right dev interface for my application. I am not able
> to find the dev entry for
> keyboard except /dev/input/event1 (evdev entry for keyboard by Xorg if I am
> not wrong).
>

U are right.   Check this:
http://www.linuxquestions.org/questions/linux-software-2/what-is-my-usb-keyboard-port-address-614571/

And my keyboard is /dev/input/event1:

/proc/bus/input>tree /dev/input
/dev/input
|-- event0
|-- event1
|-- event2
|-- event3
|-- event4
|-- event5
|-- mice
|-- mouse0
`-- mouse1

It does respond to "cat /dev/input/event1" for each keyboard entry.

> please help me to find the correct device entry files for keyboard and mouse
> irrespective of the
> i) kernel version (2.4 and 2.6) and ii) connected bus type (USB or serial)
> and iii) linux distro.
> (e.g SLES or RHEL like that)
>
> Thanks in advance. Sorry if it is not the right place to ask this query.
>
> Regards,
> Santosh



--
Regards,
Peter Teoh


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux