Jump to content

Remap keys


Yum
 Share

14 posts in this topic

Recommended Posts

From here  http://www.insanelymac.com/forum/topic/272459-appleacpibatterymanagerapplesmartbatterymanager-for-lion/page-7?do=findComment&comment=1963050

 

Ok, sorry i have not founded a right topic for this your kext, btw they have scan codes because if i use a usb keyboard then in keyboard prefpane i have the possibility to set fnf2 and fnf3 with brightness, but i want avoid the need to use a usb keyboard to shown the video options for those two keys.

 

Edit: maybe not, only F1 F2 have scan code, fn+F1 and fn+F2 not

Maybe WMI/ACPI? _but in dsdt i not see any known WMI for HP, i am confuse...

Now i try with debug version:

 

F1 =  3b=7a

F2 =  3c=78

F3 =  3d=63

F4 =  3e=76

F5 =  3f=60

F6 =  40=61

F7 =  41=62

F8 =  42=64

F9 =  43=65

F10 =  44=6d

F11 =  57=67

F12 =  58=6f

 

Fn + F1 =  e05b=3a

Fn + F2 =  nothing!

Fn + F3 =  nothing!

Fn + F4 =  1923

Fn + F5 =  nothing!

Fn + F6 =  e010=4d

Fn + F7 =  e022=34

Fn + F8 =  e019=42

Fn + F9 =  e02e=49

Fn + F10 =  e030=48

Fn + F11 =  e020=4a

Fn + F12 =  nothing!

 

F1= There is an ?

F2= brightness down

F3= brightness up

F4= probably to switch on vga

F5= really for nothing

F6= trace back

F7= pause trace

F8= trace forward

F9= volume down

F10= volume up

F11= volume mute

F12= wifi on/off

 

Not working: brightness and wifi

Working: Fn + SHIFT RIGHT= e045=71  for brightness up

 

Ok, for example now if i want to remap brightness up and down, what exactly i must do to make coincide F2F3 with brightness?

 

Thank you

 

DSDT http://d-h.st/PGt


I'm certain these keys are actually handled by ACPI/WMI, so you could go that route.

 

 

Yeah but i follow for example this guide  http://donovan6000.blogspot.co.at/2013/08/acpi-controlled-keys.html  but not known WMI hp in my dsdt so i don't know how see it.

 

This is not a typo

Fn + F4 = 1923


You could certainly remap your Fkeys (without Fn), but then you'll lose the capability to press F2, F3, F5 (some apps might use those for keyboard shortcuts). It is a choice you can make.

 

Mybe F12, btw are not important shortcut, those keys are for brightness and for me this is important. F12 is wifi

Link to comment
Share on other sites

This is not a typo

Fn + F4 = 1923

Please show the actual system.log output for Fn+F4. I'm curious.

 

Please try to read and work through the wiki. I don't have time to do it for you. To map PS2 codes to different ADB codes you need to use the "Custom ADB Map" section.

 

Refer to the existing Info.plist for the keyboard driver for examples.

Link to comment
Share on other sites

Please show the actual system.log output for Fn+F4. I'm curious.

 

Please try to read and work through the wiki. I don't have time to do it for you. To map PS2 codes to different ADB codes you need to use the "Custom ADB Map" section.

 

Refer to the existing Info.plist for the keyboard driver for examples.

Sorry for that i forgot a =   It's 19=23

 

Ok, for wiki, but fn+f2 gives me no one scan code, so how can to known the right scan code for brightness down?   It is this that i have not understand..

I don't understand how find the adb code for f2 for example 

 

 

For example here, 1 3 1 where it came from outside?

 

The ADB code for Launchpad is 83. And the scan code for the 'World' button is e032. In the debug version of the keyboard driver only, you can generate any ADB code you want. To do so, hold down Alt, then type the ADB code with the numpad number keys (0-9). The resulting code is sent after you release the Alt key. This was how I discovered the ADB code for the Launchpad is 0x83 (Alt-down, 1, 3, 1, Alt-up).

 

Link to comment
Share on other sites

Sorry for that i forgot a =   It's 19=23

 

Ok, for wiki, but fn+f2 gives me no one scan code, so how can to known the right scan code for brightness down?   It is this that i have not understand..

 

I don't understand how find the adb code for f2 for example

You're looking for the ADB code for brightness down, not F2. That way you can pick a key to use for brightness down, find out is PS2 code (by pressing it), and map the PS2 code to the ADB code. The ADB for brightness down happens to be 91. Brightness up is 90. You can see clues about ADB codes if you look at: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/blob/master/VoodooPS2Keyboard/ApplePS2ToADBMap.h, or here, near the bottom: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/blob/master/VoodooPS2Keyboard/VoodooPS2Keyboard.cpp (ApplePS2Keyboard::defaultKeymapOfLength).

  • Like 1
Link to comment
Share on other sites

Method _Q17 and _Q18 in your DSDT.aml should be responsible for brightness. WMI Device is Device (WMID). Just search for PNP0C14 in your DSDT and scroll up.

 

Please put your hardware in your signature, like many others have done it here. You make it easier for others to try to give you support. The only thing I could find out by reading your post is, it must be something "HP" and should be a lappy.

 

Have fun.

  • Like 1
Link to comment
Share on other sites

Method _Q17 and _Q18 in your DSDT.aml should be responsible for brightness. WMI Device is Device (WMID). Just search for PNP0C14 in your DSDT and scroll up.

 

Please put your hardware in your signature, like many others have done it here. You make it easier for others to try to give you support. The only thing I could find out by reading your post is, it must be something "HP" and should be a lappy.

 

Have fun.

 

Thank you, sorry for incovenient, i ll do it. About PNP0C14 there is not any of this in my dsdt, this was the real problem for me. 

You're looking for the ADB code for brightness down, not F2. That way you can pick a key to use for brightness down, find out is PS2 code (by pressing it), and map the PS2 code to the ADB code. The ADB for brightness down happens to be 91. Brightness up is 90. You can see clues about ADB codes if you look at: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/blob/master/VoodooPS2Keyboard/ApplePS2ToADBMap.h, or here, near the bottom: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/blob/master/VoodooPS2Keyboard/VoodooPS2Keyboard.cpp (ApplePS2Keyboard::defaultKeymapOfLength).

It works! Amazing! Thanks for this !  Yours are great projects, really! :)

Link to comment
Share on other sites

@Yum

 

Hello!

In your with external link posted DSDT.aml there is, with starting in line 4158, the following code:

            Name (_HID, "PNP0C14")
            Name (_UID, Zero)
            Name (WMIU, Zero)
            Name (WMIV, Zero)
            Name (ETYP, Buffer (One) {})
            Name (S001, Buffer (0x32) {})
            Name (BF2S, "                                                                                             ")
            Name (EVNT, Package (0x03)
            {
                Package (0x05)
                {
                    "BIOS Configuration Change", 
                    "BIOS Settings", 
                    0x04, 
                    0x05, 
                    0x02

:wink_anim:

 

Have fun!

  • Like 1
Link to comment
Share on other sites

@Yum

 

Hello!

In your with external link posted DSDT.aml there is, with starting in line 4158, the following code:

            Name (_HID, "PNP0C14")
            Name (_UID, Zero)
            Name (WMIU, Zero)
            Name (WMIV, Zero)
            Name (ETYP, Buffer (One) {})
            Name (S001, Buffer (0x32) {})
            Name (BF2S, "                                                                                             ")
            Name (EVNT, Package (0x03)
            {
                Package (0x05)
                {
                    "BIOS Configuration Change", 
                    "BIOS Settings", 
                    0x04, 
                    0x05, 
                    0x02

:wink_anim:

 

Have fun!

Yup, but this version is previous to the battery patch from rehabman. The patch remove completely that device. I don't know why, but it's this.

 

Rehab, is it possible to keep that device and to keep also battery patch?

Link to comment
Share on other sites

Yup, but this version is previous to the battery patch from rehabman. The patch remove completely that device. I don't know why, but it's this.

 

Rehab, is it possible to keep that device and to keep also battery patch?

I have updated the battery patch if you want to try it.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

From here  http://www.insanelymac.com/forum/topic/272459-appleacpibatterymanagerapplesmartbatterymanager-for-lion/page-7?do=findComment&comment=1963050

 

Ok, sorry i have not founded a right topic for this your kext, btw they have scan codes because if i use a usb keyboard then in keyboard prefpane i have the possibility to set fnf2 and fnf3 with brightness, but i want avoid the need to use a usb keyboard to shown the video options for those two keys.

 

Edit: maybe not, only F1 F2 have scan code, fn+F1 and fn+F2 not

Maybe WMI/ACPI? _but in dsdt i not see any known WMI for HP, i am confuse...

 

Now i try with debug version:

 

F1 =  3b=7a

F2 =  3c=78

F3 =  3d=63

F4 =  3e=76

F5 =  3f=60

F6 =  40=61

F7 =  41=62

F8 =  42=64

F9 =  43=65

F10 =  44=6d

F11 =  57=67

F12 =  58=6f

 

Fn + F1 =  e05b=3a

Fn + F2 =  nothing!

Fn + F3 =  nothing!

Fn + F4 =  1923

Fn + F5 =  nothing!

Fn + F6 =  e010=4d

Fn + F7 =  e022=34

Fn + F8 =  e019=42

Fn + F9 =  e02e=49

Fn + F10 =  e030=48

Fn + F11 =  e020=4a

Fn + F12 =  nothing!

 

F1= There is an ?

F2= brightness down

F3= brightness up

F4= probably to switch on vga

F5= really for nothing

F6= trace back

F7= pause trace

F8= trace forward

F9= volume down

F10= volume up

F11= volume mute

F12= wifi on/off

 

Not working: brightness and wifi

Working: Fn + SHIFT RIGHT= e045=71  for brightness up

 

Ok, for example now if i want to remap brightness up and down, what exactly i must do to make coincide F2F3 with brightness?

 

Thank you

 

DSDT http://d-h.st/PGt

 

Yeah but i follow for example this guide  http://donovan6000.blogspot.co.at/2013/08/acpi-controlled-keys.html  but not known WMI hp in my dsdt so i don't know how see it.

 

This is not a typo

Fn + F4 = 1923

Mybe F12, btw are not important shortcut, those keys are for brightness and for me this is important. F12 is wifi

Dude how did you determine the corresponding scan code of your keyboard and how to get the log if you know it generate?

Link to comment
Share on other sites

  • 1 year later...

Install the kext: https://github.com/RehabMan/OS-X-ACPI-Debug

  • Open MaciASL and click on patch
  • Apply "Add DSDT Debug Methods" and "Instrument EC Queries" that are under Brightness Fix.
  • Save the DSDT to /EFI/Clover/ACPI/Patched/ and restart
  • Look in system.log in the Console.app as you press the key corresponding to brightness to determine which _Qxx methods handle the keys
  • Then patch DSDT:

Assuming _Q1D is brightness down, and _Q1C is up.

Code:into method label _Q1D replace_content
begin
// Brightness Down\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0205)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0285)\n
end;
into method label _Q1C replace_content
begin
// Brightness Up\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0206)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0286)\n
end;
Change the variable _Q1D/_Q1C as per the log.
Link to comment
Share on other sites

  • 1 year later...

in my Sony Vaio laptop the FN + F1 key disable trackpad, but do not work.

The combination of FN + Imp Pan keys, if disables trackpad, as I change.

in the image of my keyboard, Fn + F13 keys

Thank you


 

IZVq9iw.jpg?1

Link to comment
Share on other sites

 Share

×
×
  • Create New...