Instructables

One-Key Keyboard Hack

Featured
Question: What do you do when your PC wants you to press F1 on boot, but you have no keyboard?
Answer: Hack together a USB dongle that does nothing but F1.

I admit that this is a silly problem and an even sillier solution, but the mind boggles at the possibilities: custom keypads for gaming, a Control+Alt+Delete "easy" button...

...any key or combination of keys can be broken out into an apparatus as keyboardy or keyboardless as you like, and used to do anything a keyboard can do!

 
Remove these adsRemove these ads by Signing Up

Step 1: Why?

"Why not just fix the error, stupid?" you might ask, "These errors are there for a reason!"
Well, you are absolutely right (though calling me names was kind of mean).

The problem is, I'm building a publicly-accessible PC kiosk (mouse only, no keyboard), and the components are squeezed into a rather small space. The donor PC featured a very tall heat sink/fan that just wouldn't fit, so I had to swap it out for a smaller one. The problem: the original fan was a four-wire model that talked to the motherboard, telling it soothing things like "I'm working." The replacement one I had on hand was a two-wire fan that refused to discuss anything with the motherboard. So on startup, the bios would report a failed CPU fan, and stop at a prompt: F1 to continue, F2 to enter startup... so my kiosk would sit there waiting for someone to press F1, and would be the lamest kiosk in history.

Of course, some of the warnings that show up during startup can be turned off in the BIOS (like the "keyboard error"), but  my BIOS had no option for "don't worry about the CPU fan." If I knew more about the world, I may have been able to grab the two unused wires from the CPU fan swap, and add a resistor or some other little bit of hardware that would fool the motherboard. Instead, a dim light-bulb flickered above my head, and I performed the following test:

Plug in a USB keyboard, hold down F1, start PC, keeping F1 pressed.

Results:
I watched as the error popped onto the screen, then vanished.
The OS loaded fine, the browser opened fine; no "Help" pop up... in short, no ill effects from holding down F1.

So I assumed that the OS was smart enough to accept the F1and then ignore a "stuck key," and I decided that my silly plan was worth doing.
Awesome instructable man! Now, only to have an "Any-PC-BIOS-key spammer" for those stupid HP BIOS screens that want you to press escape. Also, you could try searching for a firmware update that has the ability to turn off the keyboard.
yoyology1 year ago
I love this!

I do worship video for two different churches in the course of a week. Each uses a different software. The one at Church A moves from slide to slide with the arrow keys. Very convenient and ergonomic. The software at Church B uses F9 and F10, which are clumsy and wearing to use, so I end up resorting to the mouse (ugh).

This would be perfect! One little box with buttons that just do F9 and F10 (labeled Next and Previous) that I can hold in my lap while I sit back in comfort.

I'm going to dig out an old keyboard as soon as I get home!
I just want to be the first to say that when I saw the picture, the first thing I thought of was this:
keyboard-ctrl-alt-del.jpg
my favorite
pirate_keyboard.jpg
Any OS run with 1 button ???
The Macbook Wheel!

http://www.youtube.com/watch?v=9BnLbv6QYcA
the Mactini

http://www.youtube.com/watch?v=gw80nMPv1Wc
I was thinking about tha same image too :p
¡¡¡ OH.. YES !!! The essential keyboard for ANY Windows since 3.1
mcraghead (author)  killersquirel112 years ago
Hah! Spoken like a fellow MS user ;) wonder if the one in the pic really works? It certainly could. Also might help with the carpal tunnel caused by the constant stretch to accomplish the MS three-finger salute...
mtkraabel2 years ago
OK - I can really use this.

I am a mechanical designer and run CAD programs all day with my right hand on the mouse and my left hand on a SpaceNavigator ( http://www.3dconnexion.com/products/spacenavigator.html ). Often have to reach over and hit the F8 key to reset a view. Going to make one of these had have it right were I can hit it with my thumb without taking my hand off the SpaceNavigator.

Build it - they will come.
You could use AutoHotkey (autohotkey.com) and a simple script to redefine one of the extra mouse buttons to F8.

One line script;
Xbutton1::send {F8}
All combinations of mouse buttons for a three button mouse are already utilized by commands in the CAD software.

Is there a mouse available that has extra buttons?
does your wheel have a click feature? do you use it? some mice have side buttons that are programmable http://tinyurl.com/68xuaa9
logitech m305. side scrolling buttons and middleclick too, for about 15 bucks, and it's wireless. works great in linux too
How about 13 buttons?

http://www.logitech.com/en-us/mice-pointers/mice/devices/7244

If you're on OS X, I highly recommend ControllerMate, which allows you customize the behavior of almost all mice, keyboards, and joysticks (esp. ones w/o Mac drivers).
Nice one dude!
tnx!!!
@mtkraabel
You might actually benefit from something like this:
http://store.razerzone.com/store/razerusa/en_US/pd/productID.169418900
17 buttons. "MMO optimized", but I use a DeathAdder for work (non-gaming) simply because it's more comfortable & works better than other mice I've tried. I have 5 buttons (including the mousewheel), and sometimes I wish I had a few more so I could bind them using AutoHotkey. I don't recommend razer's keyboards, but I've loved their mice.

You could also try something like this, but I think it looks awfully-designed:
http://www.warmouse.com/

Good luck!
Lots have two more buttons.

http://www.microsoft.com/hardware/en-us/p/comfort-mouse-4500/4FD-00006#n

In autohotkey the buttons a Left, Right, Middle, Xbutton1 & Xbutton2.

Also many (incl the above) come with software to program the buttons if you don't want to use autohotkey
Software wouldn't do anything, this is during the bootup process, well before the OS is even running.
I was talking about mtkraable's issue re two handed CAD control & pressing F8.

Sorry for the confusion
oops, missed that your comment was a reply to a comment. thought it was straight comment to the article. my bad.
Or a foot switch.
mcraghead (author)  CVBruce2 years ago
Definitely. They sell foot switches that are basically just pressing the "up" or "down" keyfor scrolling text, or other "keys" for advancing powerpoint slides, etc.
mcraghead (author)  mtkraabel2 years ago
Nice!
mcraghead (author) 2 years ago
Hi folks! Just thought I'd pass this along because it's pretty entertaining: Thank you to Mike Nathan who posted this project at HackADay: http://hackaday.com/2011/05/29/fixing-post-errors-with-a-single-key/ ...I'm enjoying how angry this made about half of the people who left comments, and how the other half of the folks are defending my silly hack...
Forgive my ignorance, but this would be possible to do with the enter key, right? As long as I soldered the correct connections?
Absolutely. Of course, I assume you'd want a "real" button (because something that sends "enter" all day is nearly as silly as something that sends "F1"), but yes, any button (or combination of buttons) can be triggered by correctly shorting the connections on the circuit board.
Yup.
Couldn't you just have stashed the old fan someplace out of the way but left it plugged into the motherboard, and then wired the power wires for the new fan in parallel with the existing ones? Use the old fan to blow air over something else in the project that needed cooling?
klaviatury2 years ago
Lame excuse for the build but good execution, there must be a reasoning for a keyboardless kiosk and i would imagine you would want to keep it clean so not really sure why add the button with so many more efficient ways to fix the real issue ie rewiring the fan, sending a signal to the speedometer or heck removing or getting a different powersource for the fan.
Kaylonds2 years ago
Why didn't you fix the real problem? Either getting a fan with speed signal or connecting some +2V wire to the speed signal pin.
Seems way easier.
mcraghead (author)  Kaylonds2 years ago
Absolutely! Except I didn't have the item on hand, and did not want to stray from the "spend no money" mantra, and I didn't know how to fool the motherboard... wish I'd asked you sooner!
ac-dc mcraghead2 years ago
You don't have to fool the motherboard, you can give it the real RPM signal. Connect a wire from the collector pin on the transistor right before the motor coil in the fan, to the 3rd pin on the motherboard header for RPM. 4th wire isn't needed to get RPM, it is the PWM control line.

Another possible option is to edit the bios, if there is an editor you can find that handles the core version and brand (Phoenix, Award, AMI, etc.), there is probably a setting that is hidden from the user interface, although there might even be a key combination that will get you to full control page when the system POSTS prior to booting, but it is harder to find this info as it can vary.

A note to other people: A constant *on* key can cause very weird behavior on some OS (including windows) depending on which it is, or constant beeping, or especially with PS2, loss of use of the other PS2 connected input device as the buffer is full from the /stuck/ key signal.
tn. ac-dc2 years ago
you mean like that BEEPBEEPBEEPBEEPBEEP i get when i've fallen asleep face-down on the keyboard?

i can see it.
lol
mcraghead (author)  ac-dc2 years ago
MUCH wiser solutions, Kudos!

I did test the F1behavior before I went down this silly road, but I can see how the stuck key syndrome could truly bork things up in other circumstances...
Vinsu Kaylonds2 years ago
Failure of battery, that keeps the BIOS on hold, could also be the problem...
mcraghead (author)  Vinsu2 years ago
While a failed battery could indeed also cause a F1/F2 pause, in this case the message actually said "CPU fan" and I had no reason to disbelieve.
johnpoole2 years ago
great writing style.. i am going to glue the a n y keys to my usb to see if i can get my grandkids to press it them.. i know some of the end users at work would try them..
przemek2 years ago
In the line of 'fix the fan' comments, it would probably have worked to unscrew the old fan from the old heatsink/fan assembly, and attach it to the new, lower-profile heatsink.

Now, this assumes that the new fan/sink can shed enough heat to reliably run this thing.
NastX2 years ago
On Some Boards, you just can disable Stopping because of a missing Keyboard.
Look in the BIOS for something like "HALT ON" or POST-Errors.
Ronverrall2 years ago
And now for something completely different...

You have a great writing style and a lovely sense of the ridiculous. I laughed out loud a couple of times. It's very enjoyable (and much easier) to read a well written piece of work. Thanks.
Cool instructable dude!!! Never even thought about trying this with a kby. I'm gonna go try this for my custom gaming kby. Shot!!
Very innovative solution, obviously plenty of lateral thinking is happening here.

I can see a few uses for the keyboard hack by ripping out keys to make a convenient mini keyboard, but actually keeping the key depressed can be fraught with problems. I would probably prefer to go with the hardware solutions to resolve the problem - ie hotwire the tranny.

Have you been able to check for any performance issues post hack? I would expect hammering the buffer with kb signal constantly will grab plenty of CPU cycles and eventually slow or completely lock the system. Also if you have a secondary problem with the system after POST then you are going to miss it.
everyone i am soon going to make something you will all like
Sounds good.
yes, it is a copy paste box.
it has a switch for copy paste-ing, the windows key, a save key and a cut key
Kasm2792 years ago
I made something like this, but instead of actualyl using keyboard circuitry it merely shorts the DATA- wire with shield ground, which powers on a few of the early USB-equipped Macintosh models. (I had a G3 B&W in a somewhat inaccessible area and didn't want to use the original keyboard because it sucks...)
cspoelstra2 years ago
Thanx man! This was really what I needed to see, I'm currently building a cheap controller for my DJ software.. I think this will work just fine!
TheHawkeye2 years ago
You know what'd be a mean prank? Do this for the Shift key, but instead of shorting the connection you need to run it through an oscillator or something. Basically you set it so that it spams you with the Sticky Keys alert.
mcraghead (author)  TheHawkeye2 years ago
For extra "evil" points: do that on a PC with an internal USB, or intercept where the usb connection hits the mobo... bad, very bad.
That would indeed be mean, but funny xD
tn.2 years ago
this would SO totally be useful for that dratted F8 key! i hate it when i have to hit F8 - can never time it right - so i end up booting, then killing it halfway through so i get the "windows failed to load" error and the boot menu i wanted.

and YES: i have been a computer fundamentals teacher. an "any" key is a totally viable option.
vipTricks tn.2 years ago

..
Quote: "
i hate it when i have to hit F8 - can never time it right"

in a micro sec, i planed to write u the solution of "
killing.. but u made smiled at myself when found u already knew the trick!.. just on the few words after .. :)

however,

that was something worth to smile for ..



tn. vipTricks2 years ago
lol - and i thank you for your kind impulse to help me out.
Nix-892 years ago
Older PC's have a setting in the bios that has to be activated in order to intermit the startup screen by an USB device like a keyboard. So how do you enter BIOS, to activate USB devices, with an USB device?
lol imagine the confusion of the person who inherits the device :D
DieCastoms2 years ago
How about doing this exact hack, but replacing the matrices with a set of DIP switches? Flipping the right combo of switches could generate ANY key combination.. As Andy70707 says, he needs F12. mcraghead might need F2 once in a while.. It's a thought.

My wife is building a home-brew Cintiq tablet. I will be building a small button-box to give her things like CTRL, Shift, and Alt for alternate tools while using the tablet, and also combinations like CTRL-a, -c, -x, -Z, -d, -y. The combinations will be a single button each, using a 'diode matrix' to retain the simple SPST buttons that I already have about 50 of.

DieCastoms.
mcraghead (author)  DieCastoms2 years ago
2 dip switches is a great idea!
Then perhaps one "Any" key (like "tn." suggests), that would execute whatever button you've set up via the dips.

Very cool!
andy707072 years ago
Thanks, thats actually a really good idea. My bios is rather complex, and I only get like one second to push the right button. It has a boot menu, basic setup, advanced setup, and a gigabyte overclocking utility.whilst on the splash screen, I have like a second do decide which one I want, and to make it worse, my F12 which I think is advanced setup also controls the light on my backlit keyboard.
Next time you're in your BIOS menus, you might find you can change the startup delay so you have more time to make your selections. I have mine set to 10 seconds. That's plenty of time, and I don't have to be faster than a speeding bullet.
I realise you can do this, but my PC is a custom build with an SSD, so it should boot in 22 seconds. I don't want to unnecasarilly extend this time by having a longer wait time.
Azayles2 years ago
You could probably use a 555 timer chip to send fake fan signals to the tacho pin on the mobo. Super cheap, too, them chips :-)
Great 'Ible though :D And the part where you mention about bringing out other buttons to perform other functions, definitely handy!
dimpap Azayles2 years ago
I suppose building a timer will take much more efforts than just connecting a fan and putting it somewhere inside. I would say, that even there is no need or space for additional fan, all the plastic parts of the fan may be cutted and only a motor willretain spinning and send the impulses to motherboard. Anyway it will be less complicated than using 555.
And I think any such equipment contains a fan somewhere, which may be replaced with 3-wire fan, and its third wire may be connected to cpu fan socket


bhylak2 years ago
Great instructable! However, F1 is being "pressed" forever though, right?
SrvKS2 years ago
i guess there's an option in the bios to disable the prompt for F1 at startup.. why not use that?? :P might not be there on all mobos though.. so good idea :)
Because that would also prevent fun things like this from being invented. It's strange to see questions like that on this site.
zack2472 years ago
very cool!
at first glance i thought it was a device used only fro pressing the f1 key, not having the f1 key activated all the time, but this definitely is a great workaround to that pesky fan problem

i have to ask though, if the f1 keyboard is plugged in, does the f1 key stll function normally on a regular keyboard?
mcraghead (author)  zack2472 years ago
Good question: I haven't tried it yet. My guess is yes, because my hacked keyboard achieves "ignored" status, but I think the PC would still "hear" another F1 signal from a normal keyboard. An extra numeric keypad can live alongside a full keyboard, right? I think all of the signals look the same to the PC once they leave the keyboard's PCB...
Yes you can have two keyboards plugged into the same computer and working at the same time - or at least I've done it before (May depend on OS etc?)

Whether the PC is smart enough to ignore the 'stuck' F1 key and accept presses from the other, I'm not sure. Think it would be worth a try though.
ilpug2 years ago
this is so great... i will definetely make one and put it in my old WIN95 computer to get around the "you computer doesent have a mouse hooked up to it blahblahblah" error that comes up on start up. i tried to plug in my camera to upload pictures, and it somehow fried the mouse port. which is apparently irreplaceable. mousekeys work fine though.
mischka2 years ago
Cool solution for that problem and a nice write up! Thanks!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!