mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* How to check input device
@ 2009-01-20 21:43 mike zheng
  2009-01-20 23:08 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: mike zheng @ 2009-01-20 21:43 UTC (permalink / raw)
  To: linux-kernel

Hello,

It is the first time for me to use the input device. I have a keypad
driver registers a keypad the device as an input device in the kernel
2.6. The registration of the driver is OK, I can see the interrupt
whenever there is key pressed. How can I verify if it works fine?
Where can I check keycode value of the key pressed?

Thanks in advance,

Mike


Here is what I have in system:

# cat /proc/bus/input/handlers
N: Number=0 Name=kbd
N: Number=1 Name=evdev Minor=64
# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="keypad"
P: Phys=keypad/input0
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=event0
B: EV=20003
B: KEY=102374 82c193c 53ff8708 1
B: LED=285

# ls -l /sys/devices/virtual/input/input0/
drwxr-xr-x    2 root     root            0 Dec 31 16:01 capabilities
drwxr-xr-x    2 root     root            0 Dec 31 16:01 event0
drwxr-xr-x    2 root     root            0 Dec 31 16:01 id
-r--r--r--    1 root     root         4096 Dec 31 16:01 modalias
-r--r--r--    1 root     root         4096 Dec 31 16:01 name
-r--r--r--    1 root     root         4096 Dec 31 16:01 phys
lrwxrwxrwx    1 root     root            0 Dec 31 16:01 subsystem ->
../../../../class/input
-rw-r--r--    1 root     root         4096 Dec 31 16:01 uevent
-r--r--r--    1 root     root         4096 Dec 31 16:01 uniq

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to check input device
  2009-01-20 21:43 How to check input device mike zheng
@ 2009-01-20 23:08 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2009-01-20 23:08 UTC (permalink / raw)
  To: mike zheng; +Cc: linux-kernel

On Tue, 20 Jan 2009, mike zheng wrote:

> It is the first time for me to use the input device. I have a keypad 
> driver registers a keypad the device as an input device in the kernel 
> 2.6. The registration of the driver is OK, I can see the interrupt 
> whenever there is key pressed. How can I verify if it works fine? Where 
> can I check keycode value of the key pressed?

If the input device is registered properly, there should be corresponding 
/dev/input/eventX created. Running evtest (from input-utils) on this 
node will decode and dump all the scancodes/keycodes that come out of the 
corresponding input device.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-20 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-20 21:43 How to check input device mike zheng
2009-01-20 23:08 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®