BedroomLANTilde~A: Alexios' HomepageSearch |
![]() |
||
EvRouter: act on unhandled Linux HID events
Posted February 18th, 2009 by alexios
For a few years, back in simpler times, I used Jon Atkins' Unfortunately, my input devices seem to have outgrown imwheel. I now have a Logitech USB keyboard and USB mouse, both with extra buttons, wheels, knobs et cetera. None of them would work with X11 out of the box, and many weren't even detected. This is where evrouter comes in useful. It performes the following following closely allied tasks:
As of 2008 and 2009, many of these tasks are obsolete, but old software and old input devices are still around, and evrouter can make your input devices do things programmers of device drivers and application software never intended (or, in some cases, never had enough imagination to anticipate). All this is accomplished thanks to the Linux 2.4 (and above) Event Interface (
What's New?Version 0.4: I've incorporated a patch found on this page that adds support for Version 0.3.4: I've finally found the time to fix an annoying bug whereby removing a USB device Known IssuesIf you have Ubuntu's Intrepid Ibex distribution, evrouter won't work. Nothing else which accesses event devices will, either — as long as you're running an X server. The X server acquires exclusive access to the event devices, precluding any other process from using them concurrently. I'm working on this one (in a way, I've been working on this one for a while. A couple of the enhancements I've been thinking about could fix this issue). You may want to peruse Ubuntu support tickets 298963 and 267682. Many thanks to Dominik Ałaszewski for the heads-up and the links. DownloadThe tool is available as source, Debian and RPM packages. It's provided under the terms of the GNU General Public License, version 2. An old version of evrouter is still hosted on Freshmeat, but this page offers the latest versions for the most architectures. evrouter
|
|
|
|
Comments
Hello,
I can't send events with evrouter to firefox and some other windows. Evrouter doesn't detect their windows:
Window "(null)": # Window title
# Window "(null)": # Resource name
# Window "(null)": # Class name
"BTC USB Multimedia Cordless Keyboard" "/dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-event-mouse" none key/398 "fill this in!"
How can I set evrouter to detect firefox window? Or is this not possible at the moment?
I've came across this site:
http://als.regnet.cz/evrouter-gtk2-focus-patch.html
And tested patch provided there against 0.4 version and it still work.
Now evrouter correctly catch any GTK2 window titles.
Hey I'm trying to configure this MCE Remote (Arc-1100) it's a MCE Clone, using a USBHID mouse/keyboard combo, evrouter reads the keys great, and I can configure a bunch of the keys to work with XBMC however, some of the buttons on the remote, generate more then one line, and I've read the man pages for evrouter and it doesn't seem to cover multiple lines for one keypress. Unless I'm an idiot and don't fully understand, how would I work something (Yellow button on remote) that generates these three lines, send something like a single "Xkey/p" Action
"HID 05a4:9881" "/dev/input/event5" control key/29 "fill this in!"
"HID 05a4:9881" "/dev/input/event5" shift+control key/42 "fill this in!"
"HID 05a4:9881" "/dev/input/event5" shift+control key/20 "fill this in!"
I have the same problem. Is evrouter able to map a particular key sequence to a key event?
patch for SW (switch) events are really good thing. thanks.
Would you know why I am getting this X error ?
I am lacking a lot in terms of X principles, but my app (xbmc) is launched in fullscreen and directly from .xinit; SDL in fullscreen seems to grab everything => nothing goes to xbindkeys.
I am trying through evrouter, but no luck:
evtest on the same device works correctly and reports the event code.
For information:
First of all, thanks for your very useful program!
I'm using the gyration air music remote on Ubuntu 9.04 with evrouter 0.4, trying to get it to work with Miro. The remote correctly outputs XF86 commands correctly on all keys, it's just that Miro doesn't seem to care about them.
So I have tried to use evrouter to get around this, Miro has keyboard shortcuts for commands, e.g. stop is ctrl-d.
I have successfully remapped some keys, like pause now is space, which works fine. Unfortunately some keys, like stop and play don't output keypress commands when remapped in evrouter; they only output keyrelease commands!
For example, this happens when I hit play (tried to remap it to ctrl-d in evrouter)
KeymapNotify event, serial 35, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyRelease event, serial 35, synthetic NO, window 0x4400001,
root 0x76, subw 0x0, time 2055771, (150,400), root:(157,451),
state 0x4, keycode 40 (keysym 0x64, d), same_screen YES,
XLookupString gives 1 bytes: (04) ""
XFilterEvent returns: False
KeyRelease event, serial 35, synthetic NO, window 0x4400001,
root 0x76, subw 0x0, time 2055771, (150,400), root:(157,451),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Is there a way to make it output a keypress event as well? It's a really weird bug, and I'm not quite sure what to do about it.
Thanks!
Hi,
No matter what I try this always ignores the modmap setting.
Whether I use:
"Logitech USB Receiver" "/dev/input/event4" alt rel/8/1 "XKey/Tab"
or
"Logitech USB Receiver" "/dev/input/event4" none rel/8/1 "XKey/Tab"
or
"Logitech USB Receiver" "/dev/input/event4" any rel/8/1 "XKey/Tab"
It always matches whether I press a modifier or not.
Thanks.
Looking through the code, it looks like modifiers are only matched for key presses; they're ignored otherwise. So for your mouse scrolling it doesn't do any matching on modifiers.
This program is just great. It's the only program that can access all my netbook keys and still capture them when some app is running fullscreen. There is no other program that can do this so it rocks!
I have Ubuntu 8.10, downloaded and installed latest evrouter deb package. But "sudo evrouter -d /dev/input/event1" shows only the name of keyboard, but no button press is dumped.
I have found thread confirming that:
http://ubuntuforums.org/showthread.php?t=991170&highlight=evrouter
but maybe I am doing something wrong?
Regards,
Dominik
I see it's affected by a switch to Intrepid (?). Go figure. Would you be able to test this out for me using od? To repeat our email conversation (for the benefit of anyone else reading), try using this command on an event device that doesn't work with evrouter:
And operate the input device (press keys, etc). If you get rows of octal numbers whenever you use the device, it proves that evrouter is ignoring them (maybe they're not key, switch or rel(ative) events). If you don't, there's something else wrong. Either the device just doesn't send such events, or Intrepid has some change in the event interface.
What version of evrouter and what kernel version are you using? As far as I know, the event structure format has never changed, but the binaries for version 0.4 are compiled on fairly recent kernels (e.g. 2.6.26 for amd64).
Hi,
Is there anyway to get evrouter to work on Intrepid? I have a remote where scancodes with 0xc00nn are showing up, and so they are not captured by xev. I'd like to use evrouter to solve this, but it doesn't work on Intrepid!!! Grrr....
Please let me know if there is any progress on making it work on Intrepid.
thx
andrew