Unwanted events from DVB remote

Tony Houghton h at realh.co.uk
Fri Apr 24 08:59:44 PDT 2009


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>

-- 
TH * http://www.realh.co.uk


More information about the hal mailing list