Skip to content


Custom Function Key Box

NewFunctionKeyBoxAfter seeing a few keyboard related hacks, most recently the keybot at hackaday, I wanted to try something similar. I made a neat looking function key box using the guts of an old keyboard and a button box from a piece of industrial equipment.

This picture shows the finished result. Three lighted buttons that act as F9, F10, and F11. The lights are always on and everything is interfaced with USB using the controller form the old keyboard. I setup VirtuaWin to switch between three desktops using these keys. I have a fourth input which acts as F12 but have not decided what to do with it yet.

The same hack could be used to read various signals into your PC. A foot switch for example or a custom gamers keypad maybe. Some of you may be wondering why not just press the function keys. Well that would not be cool and besides my keyboard has the function keys used up as application buttons. I have to press a separate key to activate the F1-12 key functions.

KeybordThis is keyboard I gutted, one of the ugliest I have every seen. I got it for $9 somewhere as a spare keyboard. It was easy to see the PCB inside as the case is transparent.

KeyboardGutsThe next picture shows the insides of the keyboard. Each switch presses down on a flexible switch membrane. The gray metal piece acts as backing for the flex circuit seen folded in the picture. Each key has a small rubber cap that acts as a spring. the eys press on the rubber cap which press on the flex circuit. The flex circuit is several layers of plastic with the connections and switch contacts positioned under the corresponded button.

The controller PCB can be seen in the middle left of the picture. Its the green spot where the flex circuit attaches. The flex connector is secured with a metal piece against the bottom of the PCB.

KeyboardControllerThis picture shows the top side of the keyboard controller. The three LEDs are for caps, scroll, and number lock. I did not use these signals for the button LEDs. Considering that num and scroll lock are not very useful these days it might be possible to use these outputs if you have software to control them.

Most of the keyboard controllers I have see are printed on the flex circuit or are surface mount. This one has big pins and solder pads that make hacking it easy.

FlexCircuitAfter removing the controller the next step is to figure out which signals to connect to the new switches. While you could press any button I wanted four signals with a single common. F9 through F12 do have a single common so only 5 connections would be needed. This is important in my hack because I wanted to reuse the PCB inside the industrial button box which has all the switch commons tied together.

Using the keyboard as a guide I located each function key membrane switch and labeled them with a sharpie pen. I also labeled each key signal connection using an ohm meter on the flex connector.

Once the flex was labeled is was used as a guid to locate the signals on the controller PCB. A via or large pad on the PCB was identified for each of the signals.

NewFunctionKeyBoxGutsHere you see the controller board sitting in the new box with the wires soldered on. The red jumper wire provides an isolated ground for the LEDs. The two wires, orange and white in upper left get power from the USB connection to light the keys.

The other five wires are the switch common and signals for F9-F12. The unconnected blue wire is F12. I will hook it to something eventually.

I used a business card as an insulator between the two PCBs when I closed up the box. The corners of the keyboard controller PC were cut off to fit it in the box. Everything fit nicely.

In the finished product picutre it is hard to tell that the keys are lighted but it sure does look nice on my desk. Everything works great too. I press a button and my Widows desktop switches instantly.

Let me know of you keyboard input hack by positing a comment.

I still have some graphic LCD modules to give away so you might consider mentioning this article in your keyboard hack project.

Posted in Discovering, Hacks, Projects, Scrounging.


15 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. dogsrcool2me says

    I am going to use this for a iTunes song switcher for the shower. I am going to make mine water proof.

  2. dfowler says

    Shadyman,

    I also use the PS/2 port whenever I can. Why not, It saves a USB connection. Same is true for the mouse.

  3. dfowler says

    Kauz,

    You cant, as far as I know, make the F9 key on one keyboard do something different on another. You could rig up the external key box to press unused key combinations such as CTL/SHIFT/F9. In my case the keyboard has dual functions for the function keys and I usually leave them active. The F9 key on my keyboard has been remapped as a “Send Email” key and does not return the F9 key code.

  4. Shadyman says

    Hmm, I’ve been thinking about something like this for a while.. I ‘inherited’ a box of old/abused keyboards for free, and managed to grab a bunch of those circuit boards out of them before we were forced to clean house.. (Giant box of keyboards didn’t store or stack very well)

    Maybe I’ll pull the boards I salvaged out and see what I can do with them. First thing I can think of is a 3-buttoned Ctrl+Alt+Del for Windows.

    One thing that would be nice, though, is to have a supply of PS/2 pass-throughs, so you could hook one of these up inline with your keyboard. (Ok, I’m old-school, I still have a PS/2 keyboard)

    One thing to note.. AT and ATX keyboards generally use the same chip, the only thing that differs is the connector.

  5. L0rd_D4rk says

    Cool mod, it gives me a idea of how to build my own FretsOnFire guitar (GuitarHero clone for linux)

  6. ravuya says

    It seems that I could do a similar thing using a serial keyboard (like the Newton) and a Bluetooth serial device.

  7. Kauz says

    Great Item! When i get a new keyboard, i’ll hack my old one.
    But i wonder how you could program your two keyboard devices with unequal functions. You mentioned virtuaWin, but this only reacts on the settings you make. How can i make the one ‘F9’ doing something different from the other ‘F9’?

  8. The Steven says

    Hey, I’ve been working on the same basic idea for a while now…. For me it was a near perfect solution for a MAME control panel… Putting a usb hub, joystick, and keyboard controler in one box has been a W.I.P.

  9. beavis says

    if more than one key activates is because of ghosting, go to arcadecontrols.com/arcade_input.shtml#KeyboardGhosting for more info. this is a very common way to get arcade joystick and buttons for cabinets, I am planing on building one myself, just need the money 🙂

    there is some software that allows you to see the keys you are pressing (and it also includes those volume and other special keys) it is on the site.

    if you want to have that key do more, then you need autohotkey to put automation on it.

  10. Kevinsdfasdfasdfasdf says

    still..

  11. Kevinsdfasdfasdfasdf says

    I am still geeking out about about this!!!

  12. Kevinsdfasdfasdfasdf says

    That is totaly ausom!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  13. XEntity says

    Hi I like your MOD… very well executed…

    I carried out a similar mod a few years ago, but by interfacing via the COM-port – using COMCtrl (You can map the buttons to any function, use it on my server for running scripts e.g. back-up etc..

    Here’s the link, worth a read… http://www.qsl.net/ly2np/html/homemade_3.htm

  14. dfowler says

    On the keyboard keys are grouped together with a common. F9-12 for example have one side of each switch in common with each other. The keyboard has a complex multiplexing scheme which I avoided by picking 4 keys with a single common on one side.

    I found common by ohming from the switch contacts, where the 4 switches were tied together. Just moved the other meter lead across the contacts till I got a reading. Marked the contact then connected ohm meter lead to it. Then I simply pushed the desired button and moved over the contacts till I found a connection, marked it and moved to the next key.

  15. qk says

    i’ve tried doing something very similar to this but, when i try to figure out which button is which, usually about six buttons will show that they are activated at once.

    do you have any general tips about figuring out which button is which? also, do you have any larger versions of these pictures available? i’m kind of new to this and don’t know what you mean by the “common”. i tried googling for a glossary/definition to no avail.

    thanks and nice work,

    -qk.