<div dir="ltr">Hello<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 2, 2014 at 8:26 AM, Garreau, Alexandre <span dir="ltr"><<a href="mailto:galex-713@galex-713.eu" target="_blank">galex-713@galex-713.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Where do come from the numbers used in the two scripts you showed? I<br>
suppose there’s a code for each XFree86 keysym, right?<br></blockquote><div><br></div><div>IIRC, it's just a linear function of the keysym: there is a difference by about 80<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Talking about /sys/devices/platform/thinkpad_acpi: do you have the file<br>
“hotkey_tablet_mode”? I need it to detect when the screen is turned in<br>
tablet mode so that I can automatically rotate the screen. Do it need to<br>
be implemented in coreboot too?<br></blockquote><div><br></div><div>No, this is due to missing DSDT entries in coreboot that thinkpad-acpi uses:<br><br>2058 static int hotkey_get_tablet_mode(int *status)<br>2059 {<br>2060         int s;<br>2061 <br>2062         if (!acpi_evalf(hkey_handle, &s, "MHKG", "d"))<br>2063                 return -EIO;<br>2064 <br>2065         *status = ((s & TP_HOTKEY_TABLET_MASK) != 0);<br>2066         return 0;<br>2067 }<br><br></div><div>However, with the latest patch from φcoder, you should have the ACPI events directly <br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
</span>Nothing more :/ I already did the “echo 0xffffffff”, it did active some<br>
things like Fn+Space or Fn+PgUP (ThinkLight) within acpi, but nothing<br>
else. There’s still no way to access Fn+Print or Fn+Pause… I think we<br>
need coreboot to implement it, so we can detect it with acpi, right?<br></blockquote><div> <br></div><div>Yes, some function key seem to be missing. I do not understand why even after I investigated a bit more.<br><div><br>Basically, after checking up with 
more buttons, I can't get  Fn+F6, Fn+F8, Fn+F10, Fn+insert, Fn+delete to
 generate acpi events, even if I use a kernel supporting 
/proc/acpi/event (or acpid with input support flag)<br><br>Fn+F6 and F8 show up in cat /dev/input/event4, 
give me keysyms with xev (199 XF86TouchpadToggle and 220 XF86WebCam), 
but no acpi event, which makes me believe it's something that could be 
fixed.<br><br>More problematic, Fn+F10, Fn+insert, Fn+delete are dead as can be - regardless of the /sys/devices/platform/thinkpad_acpi/hotkey_mask<br><br></div><div>According to <a href="http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work#Triggering_key_events" target="_blank">http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work#Triggering_key_events</a>:<br><p>"By
 disassembling and editing the DSDT, more events can be added.  HKEY 
events are triggered by calls to the MKHQ function, e.g. <tt>\_SB.PCI0.LPC.EC.HKEY.MHKQ(0×1007)</tt> will trigger "ibm/hotkey HKEY 00000080 00001007".  Most of these can be found in <tt>_Qxx</tt>
 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 <tt>_Qxx</tt> method to get it recognized by thinkpad-acpi as well as creating new <tt>_Qxx</tt>
 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, <a rel="nofollow" href="http://www.wormnet.eu/ibm-g40/morebuttons.dsl" target="_blank">this is a modified block of DSDT for a G40</a>."</p><p>(dead link, cf <a href="http://jamie.lentin.co.uk/computers/ibm-g40/add_buttons.dsl.diff" target="_blank">http://jamie.lentin.co.uk/computers/ibm-g40/add_buttons.dsl.diff</a>)<br></p><p>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</p></div><div>Am I missing something?<br><br></div><div>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.<br></div><div><br></div><div>Thanks<br></div>Charles<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
PS: Do you have a PGP key?<br>
</blockquote></div><br></div><div class="gmail_extra">I do, but for public communication (ex: mailing list) I don't use it.<br><br>You can get it with:<br>host -t TXT charles._<a href="http://pka.devereaux.org">pka.devereaux.org</a><br><br></div><div class="gmail_extra">(it's also published in various key servers)<br></div></div></div>