---
title: Touch ID keyboard
subtitle: Add Touch ID to a mechanical keyboard
showOnCv: false
type: Personal
abstract: Mechanical keyboard modified to house an extracted Apple Touch ID sensor. The original sensor and Lightning charging connector stay accessible, so it works without custom firmware.

content:
  - src: cover
    filetype: .webp
  - src: overview
    filetype: .webp
  - src: lightning-port
    filetype: .webp

includeStlRendering: true

pdfFiles:
  - kind: manual
    file: manual

quickLinks: []

keywords: []
supervisors: []
tags:
  - Hardware
  - 3D-Printing
  - Reverse-Engineering
---

I often use my Mac closed and docked while typing on a mechanical keyboard. macOS frequently asks for authentication and without an integrated fingerprint reader this always meant typing the password manually. To fix this, I decided to integrate a real Apple Touch ID sensor into my mechanical keyboard.

The idea came from a <a href='https://www.youtube.com/watch?v=hz9Ek6fxX48'>Snazzy Labs video</a> showing that the Touch ID module from a Magic Keyboard can be reused. I bought a broken Magic Keyboard, extracted the Touch ID sensor and reused its original Lightning connector so it can still charge and communicate as before.

To mount the sensor neatly, I used a 3D-printed keycap design based on a model shared on <a href='https://www.printables.com/model/399770-touch-id-keycap-for-mechanical-keyboard'>Printables</a>. The result sits flush with the surrounding keycaps and puts the sensor within reach while the MacBook stays closed. The project includes three STL files for the bottom shell, sensor housing and top cover, as well as a short manual explaining the assembly process.

Since the keyboard was originally designed for Windows, I had to tweak the layout a bit to make it comfortable to use on macOS. I moved some keycaps around and used [Karabiner-Elements](https://karabiner-elements.pqrs.org), an open-source key remapper for macOS, to add media keys and a few useful shortcuts.

I also use [autokbisw](https://github.com/ohueter/autokbisw) to automatically switch keyboard layouts depending on which keyboard is connected. This is useful because Apple’s Dutch layout is slightly different from my external keyboard layout, with keys like ~ and ±/§ in different places. To make the keycaps match the actual output, I created a custom layout with [Ukelele](https://software.sil.org/ukelele/).