Jump to content

Fn HotKey driver for Lenovo Notebooks


EMlyDinEsH

Recommended Posts

Hello everyone,

 

      This is an ACPI driver to enable the Fn Keys (HotKey) controlled by WMI device of Lenovo Notebooks, implemented by me based on the linux WMI source as base with my own research on ACPI, OS X API which resulted in adding few new features with customizations along the way. For some Fn keys require DSDT patches in order to work.

 

Tested so far:

Lenovo IdeaPad Z50-70, Z51-70, Z500, G70

Lenovo G580

Lenovo Essential G400

 

For others, I'm not sure until its tested and it may or may not work, so i request you to contact me for support.
 
The Fn keys which my driver enables are:
Fn +

F11 -  Brightness down
F12 -  Brightness up
F7  -  Wi-Fi and BT on/off (If not working then apply DSDT patches)
F6  -  HotKey mode toggle (IdeaPad) / Fan mode toggle (Essential) - Extended with Native Touchpad on/off Fn key
F9  -  Battery conservation mode toggle - Extended with Native Display on/off Fn key
-/+/Space - Fan mode toggle - Extended with Native Keyboard backlight toggle Fn key (Only IdeaPad)

Also enables AC/DC notifications with brightness increase/decrease pop up.

NOTE:

Extended HotKey will work like this:

 

F6 (TPad) -This key works without my driver as Touchpad on/off, but i wanted to extend for controlling HotKey/Fan mode. To toggle HotKey / Fan modes, you have to turn the touchpad off & on once and this extended Function is triggered when touchpad is turned back on.

 

F9 (BLlight) - This key works without my driver as Display on/off, but i wanted to extend for controlling Battery conservation mode. To toggle Battery conservation mode, you have to turn the display off & on once and this extended Function is triggered when display is turned back on.

 

+/-/Space (SEvent) - This key works without my driver as Keyboard backlight on/off in supported models, but i wanted to extend for controlling Fan modes. To toggle Fan modes, you have to turn the backlight off & on and this extended Function is triggered when display is turned back on.

 

CUSTOMIZE DEFAULT PREFERENCES:
Edit the file "info.plist" file located inside my kext "LenovoNBFnKeys.kext/Contents/"
 
Look for the section "IOKitPersonalities->LenovoNBFnKeys->Preferences" to change

  • SoftDisplayBacklightOff -  Enable backlight on/off control in soft mode? Useful it native control not working.
  • DimBacklightOnAC/DC -  Enable brightness pop up on AC/DC to notify? Useful to see AC/DC status.
  • DimBrightnessByLevels - 0 - 15, Default value is 3.
  • DimBrightnessByLevels - 0 - 15, Default value is 3.
  • DimBrightnessThreshold - Sets threshold value for Dim feature to prevent brightness level, Default value is 1.
  • DisableBluetoothAtBoot - Disable Bluetooth at boot?
  • DisableWiFiAtBoot - Disable WiFi at boot?
  • BatteryCModeAtBoot - Enable battery conservation mode at boot? Battery conservation mode prevents charge above 60% to extend its life, so if laptop being used on AC most of the time then enable, otherwise disable this if you work with laptop on battery more.
  • MakeFnKeysAsFunction - Disable Lenovo Hotkeys mode? (only for IdeaPad) If you disable then you have to use Fn + Fx combination to trigger them, otherwise you can use Fx keys instead. Note: This will swap Fn an Function keys.
  • DualFunctionKeysConfig - Configuration value for enabling/disabling dual function (extended) HotKeys in my driver  [ 0 - Disable all, 1 - TPad, 2 - BLight, 3 - TPad & BLight, 4 - SEvent, 5 - TPad & SEvent, 6 - BLight & SEvent, 7 - All]

 

Supports: Mac OS X 10.7 or greater

 
How to install:
1) Remove my kext if already installed (Optional).

2) Apply the DSDT patches attached which are required for some keys to work.
3) Install my kext using your favorite kext installer to System/Library/Extensions.

 
For support just PM me (or) mail me at [email protected].
 
Change Log
 

Update v1.2 Released

  • Updated support for Lenovo Z500
  • Updated battery conservation mode feature (DSDT patch not needed now)
  • Updated to support new DSDT patches
  • Added Brightness dim level threshold control in plist
  • Updated support for El Capitan
  • Bug fixes and optimizations

Initial release v1.0 Released

  • Works on IdeadPad Z50-70, Z51-70, G70, Lenovo G580 and Essential G400

 

PS: If you like my work then I request you to consider a small donation if possible, because it helps me and allows to spend some time on this for future updates.

 
Paypal:9157339471_69e721d064_o.png


Thanks for the support.

LenovoNBFnKeys_v1.0.zip

LenovoNBFnKeys_v1.2.zip

DSDT Patches (Updated for v1.2).zip

  • Like 5
Link to comment
Share on other sites

Dear EmlyDinEsH,

I have a Lenovo G400s laptop with hotkeys not working.

I tried to patch my DSDT using the files that you provided, but without sucess.

DSDT Editor found 2 errors when I click in compile, I clicked in Fix errors, but they can't be fixed.

 

G400s is not compatile with your kext and patchs?

Link to comment
Share on other sites

greetings EmlyDinEsH
I have a Lenovo Thinkpad E440 I install the kext and I work the following hotkeys
Fn + F1 Disable audio
Fn + F2 Reduce audio
Fn + F3 Increase audio
I do not work
Fn + F4 Disable the microphone
Fn + F5 Decrease the brightness
Fn + F6 Increase brightness
Fn + F8 disable / enable wifi
I can not tell you if applying the patches to dsdt work, start in the world of hackintosh few weeks ago and still have much to learn.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...