Contribute
Register

[solved] how to remap brightness control keys to Fn+Up and Fn+Down?

Joined
Aug 3, 2014
Messages
102
Motherboard
Thinkpad T440p
CPU
i7-4710MQ (replaced stock i5)
Graphics
HD4600
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. Power Mac
  2. PowerBook
Mobile Phone
  1. Android
  2. Other
I've got the HD3000 brightness patch and VoodooPS2 kext working fine; the slider works but the default brightness keys are hard to find on the Lenovo Y570 keyboard:

Fn+Insert is dimmer and Fn+Home is brighter.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,161
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
I've got the HD3000 brightness patch and VoodooPS2 kext working fine; the slider works but the default brightness keys are hard to find on the Lenovo Y570 keyboard:

Fn+Insert is dimmer and Fn+Home is brighter.

What keys does Windows use for brightness adjustment?

You can look into whether the keys generate PS2 scan codes or not. Install the debug version of VoodooPS2 and look in system.log from Console.app as you press the keys.

If they don't generate any PS2 events, then it could be they are handled via ACPI by generating EC queries. You can instrument EC queries by using ACPIDebug: https://github.com/RehabMan/OS-X-ACPI-Debug, then monitor system.log to determine what EC method is called. With DSDT patches, you can change what the method does, such that it injects keys into the input buffer used by VoodooPS2... more on that if that turns out to be the case.
 
Joined
Aug 3, 2014
Messages
102
Motherboard
Thinkpad T440p
CPU
i7-4710MQ (replaced stock i5)
Graphics
HD4600
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. Power Mac
  2. PowerBook
Mobile Phone
  1. Android
  2. Other
The up and down arrow keys have little orange suns painted on them to match the orange Fn key.

In Linux Mint, these brightness keys work OOB. Pretty sure that's what they're meant for in windows.

With the debugging VoodooPS2 kext,

Fn+Insert gives ApplePS2Keyboard: sending key 46=6b down
Fn+Home gives ApplePS2Keyboard: sending key e045=71 down

Fn+uparrow does not generate a ps2 scan code
Fn+downarrow does not generate a ps2 scan code

uparrow gives ApplePS2Keyboard: sending key e048=7e down
downarrow gives ApplePS2Keyboard: sending key e050=7d down

Looks like it's gonna have to be the ACPI debug way. I think I see what to do based on the instructions you gave in several other threads. I just have to determine which _QXX methods to replace.
Code:
into method label _Q10 replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0205)\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0285)\n
end;
into method label _Q11 replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0206)\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0286)\n
end;
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,161
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
The up and down arrow keys have little orange suns painted on them to match the orange Fn key.

In Linux Mint, these brightness keys work OOB. Pretty sure that's what they're meant for in windows.

With the debugging VoodooPS2 kext,

Fn+Insert gives ApplePS2Keyboard: sending key 46=6b down
Fn+Home gives ApplePS2Keyboard: sending key e045=71 down

Fn+uparrow does not generate a ps2 scan code
Fn+downarrow does not generate a ps2 scan code

uparrow gives ApplePS2Keyboard: sending key e048=7e down
downarrow gives ApplePS2Keyboard: sending key e050=7d down

Looks like it's gonna have to be the ACPI debug way. I think I see what to do based on the instructions you gave in several other threads. I just have to determine which _QXX methods to replace.
Code:
into method label _Q10 replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0205)\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0285)\n
end;
into method label _Q11 replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0206)\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0286)\n
end;

Yup. Use ACPIDebug to instrument your EC queries and you're off to the races...
 
Joined
Aug 3, 2014
Messages
102
Motherboard
Thinkpad T440p
CPU
i7-4710MQ (replaced stock i5)
Graphics
HD4600
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. Power Mac
  2. PowerBook
Mobile Phone
  1. Android
  2. Other
Got it. _Q11 is dimmer and _Q12 is brighter. Thanks, RehabMan.
 

Attachments

  • brightupdown.txt
    441 bytes · Views: 644
Joined
Oct 2, 2015
Messages
91
Motherboard
Laptop Lenovo G50-70
CPU
4th Gen Intel® Core® i3-4030U
Graphics
Intel® HD Graphics 4400
Mac
  1. MacBook
  2. MacBook Air
  3. MacBook Pro
Classic Mac
  1. iBook
  2. iMac
  3. PowerBook
Mobile Phone
  1. Android
  2. iOS
  3. Other
I have Brightness icon on F11 Dimmer and F12 Brighter but they are not generating code in console
 
Joined
Oct 2, 2015
Messages
91
Motherboard
Laptop Lenovo G50-70
CPU
4th Gen Intel® Core® i3-4030U
Graphics
Intel® HD Graphics 4400
Mac
  1. MacBook
  2. MacBook Air
  3. MacBook Pro
Classic Mac
  1. iBook
  2. iMac
  3. PowerBook
Mobile Phone
  1. Android
  2. iOS
  3. Other
Whenever I press F11 or F12 System. Log under console not giving me response or code
 
Top