Close
0%
0%

QMK Powered Laptop Keyboard

Laptop keyboard extracted and used as an external keyboard. custom mapping. reprogrammable. its gymnastics.

Similar projects worth following
This guide will walk you through the electronics and firmware gymnastics that I had some fun with. Hardware wise it should work with FPC connector laptop keyboard interafaces, with no prior information of the grouping / wiring. Where good instructions exist I am linking them directly because the credit goes to them wholly. Sharing my process and supplying his excel tool that might help you too.

I bought a used Laptop Keyboard, interfaced it with a microcontroller, and programmed it with open source keyboard firmware. the qmk project provides lots of resources with many people leveraging the APIs to develop their own tools. 


this project focuses on using a keyboard which you have no information about and making it work as a standalone usb keyboard. you can expand on it further by adding bluetooth capabilities if you want to pursue it. 

this is not my main keyboard. i keep this in a file, and switch between a SICK68 3d printed mechanical keyboard, also programmed through kbfirmware. https://www.thingiverse.com/thing:3478494 

x-zip-compressed - 5.17 MB - 07/15/2020 at 08:35

Download

plain - 51.36 kB - 07/15/2020 at 08:35

Download

sheet - 18.84 kB - 07/15/2020 at 08:35

Download

JavaScript Object Notation (JSON) - 1.87 kB - 07/15/2020 at 08:35

Download

  • 1 × Teensy 3.2 i used a teensy 3.2 because i had it, and because it had the number of pins avaliable exposed for direct interaction. arduino pro micro(s) and teensy2.0 and teensy 2.0++ are suitable and cheaper alternatives.
  • 1 × FPC/FFC breakout board. I used a 1mm pitch, 24pin, breakout board, it allows me to tap into the fpc cable and solder it easily to the microcontroller. https://www.aliexpress.com/item/4000133849218.html?spm=a2g0s.9042311.0.0.4c704c4dC9VYz8
  • 1 × used laptop keyboard for 10SGD. i used a hp pavillion laptop keyboard, i do not know the actual model, and this project assumes you have no prior info either.

  • 1
    Solder X wires between FPC breakout board to the Microcontroller.

    For me X = 24. and i had poor experience with digital pin 33 and digital pin 25. this is attributed to set up issues which i am not

    sure how to solve so i just switched pins.

    i used wire wrapping wire for this, as i wanted to maintain flexibility and flatness of the resulting harness so i could reposition it later. its also less distubing to look at.

  • 2
    Load the keyboard decoder sketch

    Follow this instructable, https://www.instructables.com/id/How-to-Make-a-USB-Laptop-Keyboard-Controller/ you can jump to step 8. i used the teensy 3.2 decoder sketch and uploaded it through arduino+teensyduino.


    Load the teensy3.2 matrix decoder, I edited it a bit for use with excel so i get a nice layout i can keep coming back to later. modify on your own as required.


    get the 2 pins associated with each keypress. Generate 1 pair for each key till all assigned. 

     
    You can use an excel table to sort things easily. I sorted the results into 8groups of 16keys. At this point the numbers are digital pin numbers. Save this in your spreadsheet to come back to it later.

    Re assign them numbers for a new coordinate system with origin (0,0) (row=group, column=key), this would be what kbfirmware.com is looking for. 


    From the earlier pin numbers map it to the port assignments, you will use this to modify the keyboard config.h files later. 

  • 3
    Create keyboard layout

    http://www.keyboard-layout-editor.com/

     Used to generate a visually accurate gui to start off with. Download json file so you can come back to it later.

View all 6 instructions

Enjoy this project?

Share

Discussions

Kohl Jary wrote 06/15/2022 at 15:24 point

Awesome build! How feasible do you think it could be to redirect the keyboard output back to the integrated keyboard input/wire it internally to the laptop in some manner?

  Are you sure? yes | no

Gigi wrote 04/19/2021 at 13:14 point

Cool project! May I use an Arduino Nano or a Pro Mini instead of the Teensy? Or even better, an STM32 Blue Pill? I actually own these boards.

  Are you sure? yes | no

Frank Adams wrote 07/15/2020 at 19:19 point

It is a lot of "gymnastics" to load QMK so thanks for the clear instructions. I've added a link to your project at step 15 of my Instructable.

  Are you sure? yes | no

gordon wrote 07/16/2020 at 01:25 point

what an honor! very very cool.

  Are you sure? yes | no

gordon wrote 07/17/2020 at 09:07 point

added another useful info that takes kbfirmware files to parse into qmk files for manual compiling. definitely makes working with unknown laptop wiring much easier on the eyes, and would help people program custom layers and other key codes. 
https://noroadsleft.github.io/kbf_qmk_converter/

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates