All Projects → samartzidis → Winapplekey

samartzidis / Winapplekey

Licence: mit
Apple Magic Keyboard Driver (A1644) for Windows 10

Programming Languages

c
50402 projects - #5 most used programming language

WinAppleKey

Apple Magic Keyboard (A1644) driver for Windows 10. Note: this driver is not for the older A1314 model or any other models.

Feafures:

  • Swaps the Fn-Ctrl keys to align with standard Windows keyboard layouts (fearture not supported by Apple's Bootcamp driver).
  • Maps the missing Windows keys such as the Del, Insert, Print Screen, Pause/Break, etc.

Technical Details

WinAppleKey is implemented as a HIDCLASS LowerFilter WDM kernel mode driver.

keyboard-driver-stack

Installation

DISCLAIMER: This driver is signed with a self-signed (test/development) certificate. For that reason, Windows will not directly allow the driver installation unless in TESTSIGNING mode. Please be aware that permanently running Windows in TESTSIGNING mode leaves your system open to potential security risks; so please be aware of what you are doing as any consequence because of this is solely your responsibility. WinAppleKey is free software that you are willing to build and/or use completely at your own risk.

NOTE: If your system is running a UEFI BIOS, you will need to disable Secure Boot through your BIOS first.

To switch to TESTSIGNING mode issue the following command (in an Administrative command prompt) and then reboot your PC:

bcdedit.exe -set TESTSIGNING ON

You can now run the Setup.msi installer.

To uninstall, run the uninstaller from the Control Panel Programs and then manually revert TESTSIGNING mode by issuing the following command (in an Administrative command prompt):

bcdedit.exe -set TESTSIGNING OFF

Key Mapppings

WinAppleKey creates the following key mappings:

Input Key(s) Output Key
LCtrl Fn
Fn Left Ctrl
⏏︎ Eject Del
⌘ Cmd Alt
⌥ Alt Cmd
Fn+[F1]...[F12] [F13]...[F24]
Fn+LCtrl Right Ctrl
Fn+Return Insert
Fn+P Print Screen
Fn+S Scroll Lock
Fn+B Pause/Break
Fn+ Page Up
Fn+ Page Down
Fn+ Home
Fn+ End

Multimedia Keys: The multimedia keys are not directly mapped as they correspond to F19-F24 instead but you can easily use this AutoHotkey script for that purpose. Please note that this currently works only over the wired connection.

Driver Settings

You can use regedit.exe to optionally modify certain driver settings.

To enable/disable the Alt-Cmd key swapping edit the DWORD key value: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinAppleKey\SwapAltCmd. The default value is 0 (off).

To enable/disable the Fn-Ctrl key swapping edit the DWORD key value: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinAppleKey\SwapFnCtrl. The default value is 1 (on).

After changing any of these values, you will need to disconnect/connect your associated Apple keyboard(s) to trigger a driver reload, or alternatively reboot your machine.

Build Instructions

To build the driver you will need Visual Studio 2019 along with an installation of the Windows 10 Driver Kit (WDK). For the installer project, you will additionally need to install the WiX toolset.

Freequently Asked Questions

Aiming to save you some time from sending me an e-mail :)

1. Will you ever release a full version (i.e. not self-signed) of the driver that does not require Windows running in TESTSIGNING mode?

Unfortunately I can't. This is due to Microsoft enforced restrictions. In order to fully release a device driver for Windows 10 (and later) you need to run a company (Ltd.) and also purchase a driver signing certificate for that company. Both cost a significant amount of money. WinAppleKey is free and open source and I do not make any money out of it. But there is similar free software for Apple keyboards, which does not require a driver installation. It uses a custom programmed Raspberry Pi Zero W device that functions as a special USB dongle for using Apple keyboards on Windows. More info here.

2. How can I get the multimedia keys to work?

See paragraph Multimedia Keys above.

3. When running in the default fn-ctrl swap mode, the ctrl-lshift-t combination commonly used to reopen a closed browser tab in Chrome does not work.

This is an issue of the Apple keyboard hardware rather than the driver. You can use the ctrl-rshift-t combination instead.

Donate

donate
Bitcoin: bc1qecklcec0z2hzv7twf97p2tr44syw5z5aqmamrt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].