[patch] add keymap data to make random laptop vendor keys work

David Zeuthen david at fubar.dk
Mon Jun 4 07:33:05 PDT 2007


Hi,

Richard Hughes wrote:
> What about the attached? (untested)
> 
> +# Should we try to remap keys? (makes random multimedia keys work)
> +AC_ARG_ENABLE(keymaps, [  --enable-keymaps            Remap multimedia keys],enable_keymaps=$enableval,enable_keymaps=yes)
> +AM_CONDITIONAL(BUILD_KEYMAPS, test x$enable_keymaps == xyes)
> +msg_keymaps=no
> +if test "x$enable_keymaps" != "xno"; then
> +   msg_keymaps=yes
> +fi
> +

Should probably only default to msg_keymaps=yes on Linux.

> +	/* get a file descriptor to the console */
> +	fd = evdev_open (device);
> +	if (fd < 0) {
> +		printf ("hal-setup-keymap: Could not get console");
> +		return 1;
> +	}

The comment and error message seems wrong here.

> +    <match key="info.product" string="AT Translated Set 2 keyboard">

First, this should be input.product rather than info.product. Second, 
it's still a bit ugly.. I wonder if there's a better way of identifying 
keyboards hard-wired to the machine. Maybe (untested) check if

<match key="@input.originating_device:info.linux.driver" string="atkbd">

Of course, for systems with USB keyboards this won't work but I think 
that's fine; we can check other things that way.

> +    <!-- These are buttons synthesized in kernel drivers -->
> +    <match key="info.product" string="ThinkPad Extra Buttons">

Also s/info./input./. If there's any specific kernel version you need, 
it would be good to mention too.

I think Lennart had some more comments as well.

       David



More information about the hal mailing list