Bug 6732 - Have an addon for extra keys on Sony VAIO laptops
Summary: Have an addon for extra keys on Sony VAIO laptops
Status: RESOLVED FIXED
Alias: None
Product: hal
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-25 06:45 UTC by Bastien Nocera
Modified: 2007-08-01 08:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
hal-sonypi-addon-1.patch (5.12 KB, patch)
2006-04-25 08:33 UTC, Bastien Nocera
Details | Splinter Review

Description Bastien Nocera 2006-04-25 06:45:14 UTC
Would require something similar to addon-acpi-buttons-toshiba, but reading from
/dev/sonypi instead.

The main problem being that each laptop has the keys places in a different
position, ie. SONYPI_EVENT_FNKEY_F5 corresponds to "lower brightness" on my
laptop, but might be something else on another one.
Comment 1 Bastien Nocera 2006-04-25 08:33:13 UTC
Created attachment 5467 [details] [review]
hal-sonypi-addon-1.patch

First pass.

How do I change the keys generated depending on the prefix of
smbios.system.product?
For example, this S1XP has:
  smbios.system.product = 'VGN-S1XP(GB)'  (string)
and I'd like all "VGN-S1XP" devices to have those keys generated.
Comment 2 Bastien Nocera 2006-04-25 08:34:48 UTC
By the way, this is untested, and the build was made in the hal-0.5.7 CVS branch.
Comment 3 Richard Hughes 2006-04-25 08:58:45 UTC
Seems a sane way of doing this IMO, but wouldn't it be a better way of doing
this to just lauch the addon and do the keymapping in fdi files? There's an
exaple of that for the tosiba addon in the archives.
Comment 4 David Zeuthen (not reading bugmail) 2006-04-25 10:23:07 UTC
For matching, you can use "contains" (like strstr) and "contains_ncase" (similar but ignores case) as we do 
here

 http://webcvs.freedesktop.org/*checkout*/hal/hal/fdi/information/10freedesktop/10-usb-zip-
drives.fdi?rev=1.1

Comment 5 David Zeuthen (not reading bugmail) 2006-04-25 10:27:15 UTC
I also agree it would be good having the keymapping in fdi files so mere mortal users can do the 
remapping themselves. So you would have

 x-sonypi.keymapping.<keycode> = "brightness"

and your add-on would read this...
Comment 6 Bastien Nocera 2006-04-26 00:11:53 UTC
This page has the details for one special case Vaio:
https://launchpad.net/distros/ubuntu/+source/hotkey-setup/+bug/22489

sonypi includes an input device (which I wasn't told about despite having sent a
patch for it) for the keys, so we just need to convert the keys.

<mjg59> hadess: As far as I can tell, pretty much all Sonys except the really
tiny ultraportables use the same layout

hotkey includes details:
ftp://ftp.debian.org/debian/pool/main/h/hotkey-setup/
Comment 7 Richard Hughes 2006-04-28 08:01:19 UTC
David, how about merging the initial patch, and then when a user complains (if
ever) that the button mapping is incorrect, we *interrogate* them and then add
the fdi mapping thing as reqd.
Comment 8 Bastien Nocera 2006-04-28 17:03:54 UTC
Actually, we decided on IRC that it would be better to have the sonypi driver
send out the right keycodes, rather than hack it in HAL.
I'll leave this open until the sonypi driver changes are made.
Comment 9 Bastien Nocera 2007-08-01 08:05:33 UTC
Richard fixed this on my VAIO, by fixing the sony-laptop driver to emit key events with MSC_SCAN, so that the keycodes can be changed per-laptop.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.