Le 03/11/2014 à 05h29, Charles Devereaux a écrit :
> Hello
>
> On Sun, Nov 2, 2014 at 8:26 AM, Garreau, Alexandre <galex-...@galex-713.eu>
> wrote:
>
>> Where do come from the numbers used in the two scripts you showed? I
>> suppose there’s a code for each XFree86 keysym, right?
>>
>
> IIRC, it's just a linear function of the keysym: there is a difference by
> about 80

Ok… any example anywhere? like a wiki page?

>> Talking about /sys/devices/platform/thinkpad_acpi: do you have the file
>> “hotkey_tablet_mode”? I need it to detect when the screen is turned in
>> tablet mode so that I can automatically rotate the screen. Do it need to
>> be implemented in coreboot too?
>
> No, this is due to missing DSDT entries in coreboot that thinkpad-acpi uses:
>
> 2058 static int hotkey_get_tablet_mode(int *status)
> 2059 {
> 2060         int s;
> 2061
> 2062         if (!acpi_evalf(hkey_handle, &s, "MHKG", "d"))
> 2063                 return -EIO;
> 2064
> 2065         *status = ((s & TP_HOTKEY_TABLET_MASK) != 0);
> 2066         return 0;
> 2067 }
>
> However, with the latest patch from φcoder, you should have the ACPI events
> directly

Ok, so just upgrade should fix it right?

> Fn+F6 and F8 show up in cat /dev/input/event4,

Not here.

> More problematic, Fn+F10, Fn+insert, Fn+delete are dead as can be -
> regardless of the /sys/devices/platform/thinkpad_acpi/hotkey_mask

Yeah, that’s the problem.

> According to 
> <http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work#Triggering_key_events>:
>> By disassembling and editing the DSDT, more events can be added. HKEY
>> events are triggered by calls to the MKHQ function, e.g.
>> \_SB.PCI0.LPC.EC.HKEY.MHKQ(0×1007) will trigger "ibm/hotkey HKEY 00000080
>> 00001007". Most of these can be found in _Qxx methods within the DSDT,
>> which are executed on embedded controller events, e.g. _Q10 is triggered by
>> pressing Fn-F7. You can add a call to MKHQ into an existing _Qxx method to
>> get it recognized by thinkpad-acpi as well as creating new _Qxx methods,
>> which if you're lucky will correspond to an EC event that IBM never used
>> (e.g. A 770 will send Fn-Home/End/PgUp/PgDn to thinkpad-acpi if hacked in
>> this fashion). For example, this is a modified block of DSDT for a G40
>> <http://www.wormnet.eu/ibm-g40/morebuttons.dsl>.

> My best idea at the moment is that the EC gives different Q codes than
> those in the DSDT for the keys that do not generate ACPI events.

What’s a DSDT? I’m not sure of what’s HKEY, and I’m sure I don’t
understand what’s MKHQ, _Qxx, Q code, EC and G40.

> Yet in src/ec/lenovo/h8/acpi/ec.asl, I do see Fn+10, Fn+Insert, Fn+Delete
> and also Fn+Backspace, ie everything has been added, but thinkpad-acpi
> shows nothing in /dev/input/event4
> Am I missing something?

Even Fn+Insert and Delete? :D /me’s wondering if maybe the trick
Fn+<numpad> would be possible with some hack…

> PS: Do you have a PGP key?
>
> I do, but for public communication (ex: mailing list) I don't use it.

Even for signature?

Attachment: pgpMHaySMaFlm.pgp
Description: PGP signature

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to