Re: ACPI: thinkpad-acpi: add input device support to hotkey subdriver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 14 Jul 2007, Matthew Garrett wrote:
> On Sat, Jul 14, 2007 at 11:11:59AM -0300, Henrique de Moraes Holschuh wrote:
> > +static u16 hotkey_keycode_map[] = {
> > +	/* Scan Codes 0x00 to 0x0B: ACPI HKEY FN+F1..F12 */
> > +	KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
> > +	KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
> > +	KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
> > +	/* Scan codes 0x0C to 0x0F: Other ACPI HKEY hot keys */
> > +	KEY_UNKNOWN,	/* 0x0C: FN+BACKSPACE */
> > +	KEY_UNKNOWN,	/* 0x0D: FN+INSERT */
> > +	KEY_UNKNOWN,	/* 0x0E: FN+DELETE */
> > +	KEY_RESERVED,	/* 0x0F: FN+HOME (brightness up) */
> 
> KEY_BRIGHTNESSUP

Only if I start filtering it out when disabled by the mask.  This key is not
to be sent to userspace unless explicitly configured to do so by something
that KNOWS it will handle it right (hal).

> > +	/* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */
> > +	KEY_RESERVED,	/* 0x10: FN+END (brightness down) */
> 
> KEY_BRIGHTNESSDOWN

See above.

> > +	KEY_RESERVED,	/* 0x11: FN+PGUP (thinklight toggle) */
> > +	KEY_UNKNOWN,	/* 0x12: FN+PGDOWN */
> > +	KEY_ZOOM,	/* 0x13: FN+SPACE (zoom) */
> > +	KEY_RESERVED,	/* 0x14: VOLUME UP */
> 
> KEY_VOLUMEUP

No.  This is handled in firmware in IBM thinkpads, and userspace only screws
it up.  I am tired of watching people get this routed to the AC97 mixer by
default.  That is a fringe configuration that only makes sense when using a
dock, and with the audio tied to the dock's audio port, in *all* thinkpads
but (_maybe_) the *61.

Let hal enable it if it needs it for OSD, and I sure hope HAL is wise enough
to do passive handling only for the events that come from the thinkpad event
device, because if one has an external multimedia keyboard, its volume keys
should go to the AC97/HDA mixer.

Same goes for volume down and mute.

> Why aren't we setting these sensibly?

They are, in presence of an userspace that thinks it knows better, and just
screws it up all the time.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux