Unwanted events from DVB remote
Dan Nicholson
dbn.lists at gmail.com
Sat Apr 25 09:23:43 PDT 2009
On Fri, Apr 24, 2009 at 8:59 AM, Tony Houghton <h at realh.co.uk> wrote:
> My DVB card has a remote control which Linux sees as an input device. I
> want to be able to use it by reading its /dev/input/event* node
> directly, but there are unwanted side effects because it also generates
> events on /dev/console for certain keys which have analogues on a
> standard keyboard and pressing its power button causes a shutdown.
>
> I've tried to prevent this with an FDI file (see below), but although
> hal-device shows that the properties have been removed, it doesn't
> change the actual behaviour. Why would that be? Do acpid and whatever's
> responsible for /dev/console use some other mechanism than HAL
> properties to decide what to respond to? Or is my file being loaded too
> late? I called it /etc/hal/fdi/policy/10-ir-input.fdi (in the context of
> Debian unstable FWIW). Should I have used the preprobe directory
> instead?
>
> At the moment I'm having to work around it by disabling the power button
> in acpid, which also disables the case's power button, and by
> configuring xorg.conf to only respond to the real keyboard's input
> device, which isn't ideal either because the device number is subject to
> change with kernel upgrades etc.
>
> <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
> <deviceinfo version="0.2">
> <device>
> <!-- Stop remote control behaving like a keyboard -->
> <match key="input.product" contains="saa7146">
> <remove key="input.xkb.rules" />
> <remove key="input.xkb.model" />
> <remove key="input.xkb.layout" />
> <remove key="input.xkb.variant" />
> <remove key="info.capabilities" type="strlist">input.keys</remove>
> <remove key="info.capabilities" type="strlist">button</remove>
> </match>
> </device>
> </deviceinfo>
If you only want X to access the device, you can use evdev's GrabDevice option.
<merge key="input.x11_options.GrabDevice" type="string">True</merge>
This means that you won't be able to use the device with lirc, though,
since the events will only be received by X.
--
Dan
More information about the hal
mailing list