Getting Fn Toggle key to work on HackBooks

Well, for over a week. I was furiously trying to battle out on how to get Fn Key Toggle to work on our HackBooks. The main reason is that I dislike the idea of pressing Fn + F1 to get brightness or special function keys to work. In Mac , you’ve an option to toggle it but then it does not work on Hackint0shes as Mac uses USB Keyboard and our Internal Laptop keyboard and mouse are still based on legacy PS/2. Anyhow it took me a long time to figure it out on how to get it to work , and I’ve a working solution for Snow Leopard (for 32-bit Kernel only as I’ve compiled the driver for 32-bit , you may however compile it for 64-bit) . and Leopard.
The reason why I made it for 32-bit is that Real Macs use 32-bit kernel , thats the main reason why I am sticking with 32-bit. Anyhow , before we get our hands messy. There are few things that you should take into account. Firstly , you must have the ability to patch and modify your dsdt as we would be making slight changes to it to reflect few things. Secondly , you need to know how to recovery in case of screw ups. Thirdly , stop posting stupid comments such as “OMG please patch my DSDT”. I am not going to entertain such requests , however if you’ve other suggestion or better approach feel free to post a comment or mail me directly.
Currently this guide is not for newbies or those who do not have any clue on what they are doing as I did not explain on how to fix permissions , generating mkext , replacing kernel extensions , getting dsdt , compiling dsdt.  Be sure to have the basic knowledge of it first before attempting it !
Here are few things that you need to grab :-
KeyReMap4Macbook (patched by a guy in Vodooo forums) to include support for PS 2 Devices otherwise it would not work. Its vital for us to install this first , as not only it gives us the chance to modify keys in our hackbook but it also enables certain functions tow ork
ApplePS2Keyboard.kext (I’ve patched this manually , by collecting few patches from Vodooo forum and Meklort’s Dell Mini 9 keyboard. The problem with his its that its made to Dell specific , so I removed few things and made it a bit specific for Wind and other general netbook). It behaves like HID Devices meaning that these applications which allows 3rd party addon to behave like the way we want . (Source Code)
Note – VodooPS2 Kexts may just work fine as well. However the original ApplePS2Keyboard.kext may not work as it does not follow some of HID property thingy that we need it to get it up and working
FunctionFlip – For some reason the new version does not work , it does not scan for legacy devices instead it focuses on USB Devices. I guess the author made a right choice as only Intel macs are using USB Keyboard. anyhow I’ve managed to patch it for 32-bit. I am not too sure about 64-bit , but anyway System Preferences would run in legacy mode , so its not a big issue. You can obtain the patched copy here. It just makes sure it sees PS2 Keyboard as an Apple USB Keyboard , thus allowing it to work.
The DSDT diff – you can obtain it from here. Its in pastebin.
Now let us get started. Be sure to backup your stuff before you proceed
1. Firstly we would have to patch our DSDT for it. Be sure to grab your DSDT.dsl and add this following line to it
Compile your dsdt.dsl and hopefully there is no errors or what-so-ever for it. Try booting with your new DSDT.aml , and everything works great , we can proceed on with step 2. I’ll be posting a complete how-to fix later over at projectOSX.
2. Once we have it patched. Just be sure to grab the patched ApplePS2Keyboard.kext and put it inside of your ApplePS2Controller.kext. That is right click ApplePS2Controller.kext , View Package Contents , then navigate it through Contents -> Plugins. Backup the old ApplePS2Keyboard.kext and replace it with the patched kext. Save it. Generate your extensions.mkext (fix permissions or what-so-ever). Reboot and hopefully your keyboard works.
3. Install the patched keyremap4macbook and FunctionFlip and reboot your mac for the last time
4. If everything went okay , go to system preferences , enable FunctionFlip and choose a suitable keyboard layout and just select which keys you want to remap. Currently I’ve remaped it to the one which has music keys as its easier for me to play , pause , rewind on my msi wind. Plus it behaves exactly like how a macbook air should
Keep in mind that this is the first draft  and its 1 Am here when I wrote this post. I’ll be adding pictures up tomorrow and spicing up things and maybe post it up in forums so that folks are aware of it.

6 thoughts to “Getting Fn Toggle key to work on HackBooks”

  1. The link for the DSDT code doesn’t work for me. Also, do you know if this would work for a 1005HA? I am currently using voodoops2/trackpad as it works much better than appleps2. How would the guide differ in that case? Thanks much.

  2. Prasys,
    I’m trying to get the brightness keys to work on Dell 14z. I’m running Sl 10.6.3, and there is no ApplePS2Controller.kext in the S/L/E folder to enclose the ApplePS2Keyboard.kext into. I’m using the VoodooPS2Controller.kext in the Extra/Extensions folder. Any advice on how I can get the brightness controls (F4 & F5) working, as well as while on battery. I’ve been trying to find a solution for months and it’s driving me crazy.

Leave a Reply

Your email address will not be published. Required fields are marked *