Skip to content

Instantly share code, notes, and snippets.

@KhaosT
Last active February 24, 2026 13:58
Show Gist options
  • Select an option

  • Save KhaosT/1406a6b6bea38f59e059c2afcb39d545 to your computer and use it in GitHub Desktop.

Select an option

Save KhaosT/1406a6b6bea38f59e059c2afcb39d545 to your computer and use it in GitHub Desktop.
Make your own Touch ID Button

Tools Needed

  • iFixit iOpener Set
  • T4 Screwdriver
  • T3 Screwdriver

Steps

  1. Soften adhesive using iOpener IMG_1610

  2. After about 60~90 seconds, use Opening Picks (or a slot screwdriver that's thin enough to fit) to pry open the back cover from upper right corner IMG_1611

  3. Apply more forces to completely remove the back cover IMG_1612

  4. Disconnect the battery IMG_1614 IMG_1615

  5. Remove the screws (T4) that keeping the black plate attached to the frame and remove the black plate

  6. Disconnect all 3 connectors from the logic board and take out the logic board from the Keyboard frame IMG_1616 IMG_1618

  7. Remove the Lightning connector (T3) IMG_1620

  8. Remove the power switch from upper left corner (T3)

  9. Carefully remove the sticker(?) from the connector and disconnect Touch ID sensor from the connector IMG_1621

  10. Unscrew the mounting screws around the Touch ID sensor (T3), and remove the Touch ID sensor L1030076

  11. Carefully remove the flex cable used to connect Touch ID sensor

Now you have all the parts to put together a standalone Touch ID device for your Apple silicon Mac.

After connecting the Lightning connector and Touch ID sensor back to the logic board, you can pair the Touch ID sensor with your Mac under System Preferences.

If the pairing step doesn't appear when you go to Touch ID settings -> add a new fingerprint, make sure the Touch ID sensor is correctly connected and try power cycle the Touch ID device.

@swierzbicki
Copy link

swierzbicki commented Dec 6, 2024

@alexmakus Sure. I can explain.

Use touch id without cable connection -> "use touch id WITH battery, without connecting the USB/lightning cable".

I hope this explains what i wanted to say 😄

But before you wrote i found the answer. So basically if i understand correctly.

**It's possible to use touch ID with battery ** and connect it via bluetooth.

And the reason why some of us do not put the battery to their new 3d printed cases is that case would be bigger instead of having just a touch id, motherboard inside the case.

@alexmakus
Copy link

Ah, I understand. Yes it is possible, it’s a Bluetooth keyboard after all :) however, and that’s where the “power switch” part comes in. If there’s no easy way to turn the keyboard off/on, if you need to pair it with a new computer, the easiest way to do so is to connect it with a Lightning cable. That’s when the pairing happens and Touch ID will be recognized.

@swierzbicki
Copy link

@alexmakus

it’s a Bluetooth keyboard after all
Yup. But first two video i've seen showed version without battery and i was wondering... why? 🤷🏻‍♂️

however, and that’s where the “power switch” part comes in

True.

I've bought a used Magic Keyborad with touch id. And i will try to do separate touch id module.
Unfortunately i don't have 3d printer to test and prepare enclouser with power switch 🥺

@taneshin
Copy link

Anyone experimented with switching the lightning connector out for a usb c one?

@thunder-god-cid
Copy link

I managed to tear the ribbon cable between the mainboard and the touchID sensor. Anyone found a replacement?

@sunxkui
Copy link

sunxkui commented Jun 1, 2025

IMG_1130
IMG_1166
108key,A2520 Controller

@dir
Copy link

dir commented Jun 5, 2025

Wrapped mine up today, not really a hardware guy so it was a bit tougher than I'd like to admit. But, with a bit of patience, we got there!

I used a USB-C TKL Magic Keyboard, and the housing is the Clickable Touch ID Box 3D print model.

IMG_0470

@cosmicbuffalo
Copy link

I managed to tear the ribbon cable between the mainboard and the touchID sensor. Anyone found a replacement?

I just did the same... still searching

@spkane
Copy link

spkane commented Aug 9, 2025 via email

@millerjason
Copy link

I've had no issues with the lightning connector on two of these, but I cannot get either of them to work wireless via Bluetooth.

For someone who has successfully accomplished wireless, I have a few questions:

  1. you do not need the power switch and connector (and prior position does not matter),
  2. you do not need anything from the keyboard ribbon cable (and did not short any of those lines for power), and
  3. you did not need to connect a new antenna (just using the board itself)?

The behavior I am seeing is that if I connect via lightning then the battery will charge, but when I disconnect the cable it does not show up in Bluetooth and the battery depletes very quickly. But given I am seeing this on both, I do not expect a simple cable connection error.

@jcr-
Copy link

jcr- commented Aug 20, 2025

I've had no issues with the lightning connector on two of these, but I cannot get either of them to work wireless via Bluetooth.

For someone who has successfully accomplished wireless, I have a few questions:

  1. you do not need the power switch and connector (and prior position does not matter),
  2. you do not need anything from the keyboard ribbon cable (and did not short any of those lines for power), and
  3. you did not need to connect a new antenna (just using the board itself)?

The behavior I am seeing is that if I connect via lightning then the battery will charge, but when I disconnect the cable it does not show up in Bluetooth and the battery depletes very quickly. But given I am seeing this on both, I do not expect a simple cable connection error.

I have the materials but haven't yet started to tear the keyboard apart. However I will note that the bluetooth "window" (The plastic strip in the metal at the thickest edge of the keyboard) is at the opposite end from the touchID. I would presume that the bluetooth antenna is located there. So either there is a separate antenna (connected by the wide ribbon cable?) or it built into the board at the corner that just barely overlaps that window.

Edit to add: In the photos at the top of this page, you can see a little silver metal bit on the upper-right corner of the tenkeyless board. That is almost certainly the bluetooth antenna. Make sure it isn't damaged on yours.

I also suspect that the metal keyboard case itself and the plastic window aperture are tuned to work with the bluetooth antenna signal, and I would not be surprised if range was shorter when the board is in a different enclosure.

The little round shiny thing on the traces from the built-in antenna is a micro-coaxial connector that could probably be used to connect an external bluetooth antenna.

image

@jcr-
Copy link

jcr- commented Aug 22, 2025

Just wanted to note that I was able to successfully create a free-standing touchID that works with my home and work M1 MacBook Pros. Some notes:

Yeah, it is a giant PITA to get the glued-on bottom panel off the keyboard. I used the iFixit iOpener heating pad to soften the glue, and started out trying to shove the big guitar picks into the seam, but the picks just weren't stiff enough, and were too small/hard to grip to generate enough force to shove them in.

I eventually used a heavy-duty X-acto blade in a #2 Handle very carefully to get started, and inserted guitar picks behind it as I went. Pretty much ruined the blade as it is now covered with sticky glue, but it did its job. Cut away from you and keep your fingers well clear. Take it slow.

Once I got enough of the edge separated to slip some fingers in the space, it just became a matter of brute-forcing the back away from the metal frame of the keyboard case.

I did not have to remove the sticker/tape and disconnect the touchID sensor cable from the longer ribbon cable as in step 9. Just leave it taped and connected, peel it up very carefully, and feed the whole length carefully out the top of the keyboard. I used a spudger to start lifting the cable from the loose (circuit-board) end, and to gently pry off the tiny inline circuit board that is glued to the frame just to the left of that taped connector. Go slow and be gentle, these ribbon cables are very delicate and easy to rip. Ask me how I know.

I used Snazzy Lab's wired enclosure. It looks clean and unobtrusive. I kind of would have preferred not to crazy-glue the sensor in to the enclosure in case I change my mind later, but hey "just glue it" appears to be the Apple motto. I found that I couldn't get the lightning port to be really secure using the melted-pin method as designed, so I also used some crazy glue to secure it to the tab above it. As we like to say in the Midwest, "That ain't going anywhere." I will probably add some small rubber feet to keep it from sliding around on the desk.

I already had fingerprints registered on my MacBook Pro with the built-in sensor, and the keyboardless sensor Just Worked™ without any re-registration. I tested before I glued things down of course.

@jakub-trzebiatowski
Copy link

As the ungluing problem seems to be significant, I can share something that worked like a charm.

Putting the keyboard on the heated 3D printer bed.

5110EB7D-9609-41AC-87DB-BBC8F8A388FA_1_105_c

594B4F1B-12F2-4421-BC20-33EDF1FE0F83_1_105_c

Large heating area, fully customizable temperature.

@millerjason
Copy link

millerjason commented Aug 22, 2025

I've had no issues with the lightning connector on two of these, but I cannot get either of them to work wireless via Bluetooth.

For someone who has successfully accomplished wireless, I have a few questions:

1. you do not need the power switch and connector (and prior position does not matter),

2. you do not need anything from the keyboard ribbon cable (and did not short any of those lines for power), and

3. you did not need to connect a new antenna (just using the board itself)?

The behavior I am seeing is that if I connect via lightning then the battery will charge, but when I disconnect the cable it does not show up in Bluetooth and the battery depletes very quickly. But given I am seeing this on both, I do not expect a simple cable connection error.

Answering my own questions for the benefit of the community:

  1. I did not need the power switch -- it's "always on" for me even without the switch parts connected.
  2. No, I did not need anything from the keyboard ribbon cable.
  3. The antenna appears to be the top right of the keyboard near the rubber strip. When you remove the board, it ends up just being a little metal stub - but that still has surprisingly good range without adding an external antenna wire.

In terms of my actual connectivity and battery issue...

The glue was a huge pain, so I used WD-40 Specialist Contact Cleaner Spray to loosen the glue instead of heat/pressure. FWIW, this worked great - I didn't heat the board nor had to do much prying like the YT videos. While that spay appears safe for the electronics, I believe it damaged the batteries in both. I replaced one battery today and the wireless TouchID is now working great!

Incidentally, you can use wireless Bluetooth (without any battery) by just using a USB power cable if you don't want to give up a USB port on the Mac. That seems obvious in hindsight, but I hadn't considered it originally since you need to actually connect to pair first.

@millerjason
Copy link

The little round shiny thing on the traces from the built-in antenna is a micro-coaxial connector that could probably be used to connect an external bluetooth antenna.

Brilliant! I hadn't noticed that little detail.

@RobotRogue
Copy link

RobotRogue commented Aug 27, 2025

As the ungluing problem seems to be significant, I can share something that worked like a charm.

Putting the keyboard on the heated 3D printer bed.

5110EB7D-9609-41AC-87DB-BBC8F8A388FA_1_105_c

Large heating area, fully customizable temperature.

What temp did you end up going with? (Hard to tell, looks like 65C?)

@jakub-trzebiatowski
Copy link

What temp did you end up going with? (Hard to tell, looks like 65C?)

70 C

@dir
Copy link

dir commented Sep 9, 2025

FWIW the glue wasn't too bad for me, I used a cheap heatgun from Amazon, blasted it around the edges and worked my way around the perimeter with some guitar picks.

@kglueck
Copy link

kglueck commented Oct 10, 2025

  • the battery has a pull-tab adhesive, so you don't need to pry it out (like I did)

This was gold. Thanks!

@bcrpntr
Copy link

bcrpntr commented Dec 5, 2025

I managed to tear the ribbon cable between the mainboard and the touchID sensor. Anyone found a replacement?

I just did the same... still searching

Anyone have luck finding one or a workaround?

@stefanerdmann
Copy link

stefanerdmann commented Feb 7, 2026

After connecting the device to a Mac, it is successfully identified as a keyboard. While physical button presses (clicks) register perfectly, fingertip contact (touch) does not trigger any input. Any ideas?

@jcr-
Copy link

jcr- commented Feb 8, 2026

After connecting the device to a Mac, it is successfully identified as a keyboard. While physical button presses (clicks) register perfectly, fingertip contact (touch) does not trigger any input. Any ideas?

If you disconnected anything, make sure you reconnected it the right way (that is, check the connector isn't flipped if it is the sort of ribbon connector one can flip around). Also inspect the ribbon cables for any damage.

@cosmicbuffalo
Copy link

btw to try and save more people from accidentally destroying their batteries by prying them out, this pic shows the adhesive pull tab for the battery circled in red. peel this off and pull it out from under the battery and the battery will pop right off:
167238383-1abf4c48-63fe-44cb-b0e9-baab7e3a5b1f

@bolsoncerrado
Copy link

bolsoncerrado commented Feb 21, 2026

Can anyone explain how in the world did you suggest to

"11. Carefully remove the flex cable used to connect Touch ID sensor"

and leave the peeled touch ID cable exposed like that and expect to reconnect it properly to the board?

Or did I miss something here?

Either that or they introduced a different way to attach the extension wire on different revisions to cut costs, because mine didn't have a connector on the touch ID side :'(

@jcr-
Copy link

jcr- commented Feb 21, 2026

Mine had a cable-to-cable connector some distance from the Touch ID sensor, but despite the instructions to unwrap the protective tape and disconnect it, I left it attached at that point and was able thread the whole cable including the connector assembly out of the keyboard frame. I think that saved me some hassle and also additional opportunities to break delicate things.

@bolsoncerrado
Copy link

Exactly as pointed out by my own experience and someone at printables too:

1000304636

@KhaosT
Copy link
Author

KhaosT commented Feb 21, 2026

Can you share a picture of what yours look like? I wonder if they did some hardware revision recently.

@bolsoncerrado
Copy link

bolsoncerrado commented Feb 21, 2026

I discarded it already :( But even in the youtube video, the guy shows the touchid assembly like yours and in the next frame the rest of the ribbon cable has magically reappeared! Like if he noticed he messed it up like I did :(

I'm just way too surprised no one else "complained" about this before and so many successful builds no one warned the community besides MBCook and myself....

@jcr-
Copy link

jcr- commented Feb 23, 2026

Can anyone explain how in the world did you suggest to

"11. Carefully remove the flex cable used to connect Touch ID sensor"

and leave the peeled touch ID cable exposed like that and expect to reconnect it properly to the board?

Or did I miss something here?

I believe step 11 refers to removing the remaining length of ribbon cable (the part labeled 821-03058-A in step 9) from the keyboard chassis. That is, carefully peeling up the thin ribbon cable that goes from the touch ID sensor connector to the main circuit board.

In my case, I did not disconnect the circled tape-covered connector, so the touchID board and the whole length of the cable was still attached. Then I fed the whole length (which was already unplugged in step 6) out of the chassis together.

So I don't know if mine could be unplugged or not; I never tried.

@bolsoncerrado
Copy link

Yes, that IS the way, but the pic tells otherwise, and shows the "shortened" version of the touchID.

Also important to note somewhere that if you "fck" up the wire, you'll have to use a donor touchID from the EXACT same FAMILY keyboard it belonged to or it wont work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment