Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
which input event belong to which device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jancici
Apprentice
Apprentice


Joined: 27 Jan 2004
Posts: 284
Location: Slovakia

PostPosted: Mon Jan 12, 2009 8:07 pm    Post subject: which input event belong to which device Reply with quote

I am not able to find what is creating /dev/input/event5

please see my another thread : https://forums.gentoo.org/viewtopic-t-725060-highlight-.html

is there any way how to find out which input device is using which /dev/input/EVENT* ?

thanks for any tip
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Mon Jan 12, 2009 9:41 pm    Post subject: Reply with quote

What you have to have in mind first is that if you
i.e. use many usb input devices, there no way of telling
what index goes to which device: indexes depend on detection order.

Having said that, check /proc/bus/input/devices but that probably won't tell you more,
than hal already shows.
Back to top
View user's profile Send private message
jancici
Apprentice
Apprentice


Joined: 27 Jan 2004
Posts: 284
Location: Slovakia

PostPosted: Mon Jan 12, 2009 9:50 pm    Post subject: Reply with quote

well
hal is saying
Code:
hal-device /org/freedesktop/Hal/devices/computer_logicaldev_input_0
udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_0'
  info.subsystem = 'input'  (string)
  input.xkb.rules = 'base'  (string)
  linux.sysfs_path = '/sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:19/device:1a/input/input5/event5'  (string)
  info.category = 'input'  (string)
  info.product = 'Video Bus'  (string)
  input.xkb.model = 'evdev'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.capabilities = { 'input', 'input.keys', 'button' } (string list)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_0'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.variant = ''  (string)
  input.device = '/dev/input/event5'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  input.x11_driver = 'evdev'  (string)
  input.product = 'Video Bus'  (string)
  linux.subsystem = 'input'  (string)
  linux.device_file = '/dev/input/event5'  (string)
  info.addons.singleton = { 'hald-addon-input' } (string list)


and I am asking, which device is it in my laptop?

okay, I did unplug USB mouse and keyboard, still there :-(
Back to top
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1709
Location: Poland => Lodz

PostPosted: Mon Jan 12, 2009 9:58 pm    Post subject: Reply with quote

This will give you all of them:
Code:
#!/bin/bash
for arg in `hal-find-by-capability --capability input`; do
   hal-device $arg;
done

Keyboards will have input.keys, buttons have input.button, switches have input.switch etc.
Back to top
View user's profile Send private message
tmr
n00b
n00b


Joined: 19 Sep 2002
Posts: 48
Location: Finland

PostPosted: Tue Jan 13, 2009 2:25 pm    Post subject: Reply with quote

Code:
udevadm info --query=all --name=input/event#
Back to top
View user's profile Send private message
jancici
Apprentice
Apprentice


Joined: 27 Jan 2004
Posts: 284
Location: Slovakia

PostPosted: Wed Jan 14, 2009 1:21 pm    Post subject: Reply with quote

I did use a TRICK
Code:
cat /dev/input/event5


and pressing FN+F5 or FN+F6 {brightness control} I did noise characters
so I know what is event5 now ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum