Академический Документы
Профессиональный Документы
Культура Документы
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
Author:randofo
Randy Sarafan loves you! I am the author of the book '62 Projects to Make with a Dead Computer' and Community Manager here at Instructables. I'm always sharing tons of awesome projects. Subscribing to me = fun and excitement!
PIN LAYOUT:
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
| | | | | | | | XXXXXX | | X | | | | | | | | X 1234 5678 12 11 10 98765 432 1 SIDE A SIDE B PIN SIDE A A01 - 0, 9, 8, 7, 4, 3, 2, 1 A02 - 6, 5, A03 - N, B, ?(slash) A04 - (period), (comma), M, V, C, X, Z, (enter) A05 - H, G, (space), ' A06 - L, K, J, F, D, S, A, ; A07 - Y, T A08 - P, O, I, U, R, E, W, Q PIN SIDE B A02 - 1, Q, A, Z A03 - 2, W, S, X A04 - 3, E, D, C A05 - 4, 5, R, T, F, G, V, B A06 - 6, 7, Y, U, H, J, N, M A07 - 8, I, K, (comma) A08 - 9, O, L, (period) A09 - P, 0, ?, -, ', ; A11 - (enter) A12 - (space)
Image Notes 1. Where plastic sheets connect to the pins on the board.
Image Notes 1. Pin SIDE B... 1 through whatever... from right to left.
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
Image Notes 1. Pin SIDE A.... 1 through 8... from left to right
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
Image Notes 1. Don't let your USB cable rip off like this one did. It would be a good idea to make a note of which colors connect to the board where as in the next picture.
Image Notes 1. bend your wires like this and then slide them over the edge of the board so it connects to the pin.
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
Related Instructables
Comments
50 comments Add Comment view all 144 comments
currently_awake says:
Jan 5, 2011. 6:01 PM REPLY keyboards send two scan codes for each key hit. One for each key press, a second for the key release. (the second has a bit set to mark it as a release). All the keys on the keyboard work this way, even shift and control. Oct 21, 2010. 12:47 PM REPLY Great Instructable! I'm a little confused though. So all we need to do is wrap the wire around to the corresponding pins and GLUE them down, or SOLDER, or does it matter? Also, I'm trying to build one with one simple function...I want to make a big "Easy" button, or something like an "Easy" button send a space bar input. Would I follow the steps in this instructable, connect the "free" side of the wires from the modded keyboard controller to a prototype breadboard, and connect the leads of the Easy button to the breadboard where the wires from the keyboard connect? So basically keyboard controller -> Prototype breadboard <-Easy button...? Thanks so much!
snag46ed says:
snag46ed says:
I'm kind of a noob when it comes to hacking electronics, fyi :)
thealeks says:
Sep 6, 2010. 3:18 PM REPLY very nice instructable! im about half way thru hacking a keyboard of my own and this has helped me immensly! my hack is a little different tho. ill post an instructable soon! Jun 25, 2010. 6:36 PM REPLY I tried to make this hack work with an old PS2 keyboard I had laying around -- to paint the keys on it and use as a synth controller on my mac - even got the PS2 to USB wiring worked out but it lights up and doesn't allow me to input characters ; nor is is recognized as a USB keyboard. I think there may be a USB device controller that PS2 boards doesn't have ; so perhaps changing the first page 'USB or (any) keyboard can be converted' should be changed if there isn't any way to make a PS2 one work. Here's the controller I pulled out of the old PS2 dell quietkey : The PCB is 123452 REV J ; the large IC has the following markings: nmbk15r4286 std5a8d bh 124200-002
capth00k says:
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
Sep 3, 2010. 7:05 AM REPLY You are absolutely right about the USB device controller. All USB devices have controller chips - that's how the OS recognizes that a USB device has been connected. ~/Lee
jibatsu says:
Aug 5, 2010. 6:09 AM REPLY on my keyboard, multiple keys are on the same pin e.g. the left key and the enter key, do i solder double wires onto the pins to connect to 2 keys. will they both work independently?
randofo says:
Aug 5, 2010. 7:59 AM REPLY Yes, multiple keys will be on the same pin. The key presses are created by connecting different pairs together. So, for example, one pin on "Side A" might connect to eight other keys on "Side B" to make eight different key presses.
jibatsu says:
so i only have 1 wire to each contact. amirite?
randofo says:
Aug 5, 2010. 10:20 AM REPLY Yes, but you would want to connect that 1 wire to each switch that you are looking to add. So, if left and enter go to the same pin, that 1 wire would connect to both the left and enter buttons. Aug 5, 2010. 9:00 AM REPLY all i need is L shift, S, enter, left, up ,down, num enter, num +, num - i followed the tacks back to the pins and marked them, how do i then wire it up as i have more buttons than pins.
jibatsu says:
KarateLover21 says:
I am hoping to make a controller for scratch. I am making arrow keys, ZXCV and space.
DackMilk says:
Mar 1, 2010. 4:13 AM REPLY HOW ARE THE "ALT" AND "SHIFT" KEYS IMPLEMENTED? THESE SIGNALS ARE NOT SEEN BY MY COMPUTER IN ANY WAY BUT PRESSING THE GOD DAMN SHEETS OF PLASTIC TOGETHER!!!
Fuingurth says:
well apparently, the CAPS LOCK key IS recognized
Aug 13, 2008. 5:52 AM REPLY i have a usb keyboard and have tried to solder wires on but the contacts are like half a millimeter apart i am using a 12 watt soldering iron and i am neat at soldering
Madrias357 says:
Try using just a little less solder. I've found that to be very useful.
hacker3455 says:
Is there any visual way to tell if you fried your keyboard PCB?
randofo says:
It stops inputting letters into the computer.
hacker3455 says:
Mar 31, 2010. 10:10 PM REPLY well i know thats not working, just wondering any dis-coloration in the board or something to that extent that would be an indicator. Guess i need to get a cooler soldering iron and a new keyboard.
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
denis10k says:
Jan 25, 2010. 4:37 AM REPLY A very easy way to find out which pin goes to which button: Put one of the layers on a image scanner, scan it and fill the lines with different colors using the fill tool. Took me only 30 minutes to get the entire pin layout Dec 22, 2009. 11:25 AM REPLY Insane. I had absolutely no idea that a keyboard's guts were so simplistic. I've created numerous toys/devices and have always been lacking for a way to design my own input method that didn't involve some complex crap with an arduino<sp?> device or something. My latest attempt was going to be a large MAME machine, but I was scratching my head on just how to deal with the inputs. Trying to stick a full-blown keyboard into the device just to have the buttons press the keys seemed a bit hacky at best. This is awesome. Now I'm just TRYING to figure out what all I want to make with my extra keyboards. I even have some wireless keyboards that I could see using to do some fun stuff with.
Javin007 says:
ratgod says:
Oct 16, 2009. 8:56 PM REPLY I've had a similar idea, I was going to use an old PS/2 style keyboard as an arcade joystick interface, I have the board out and mapped the keys (I shorted the sequences while plugged into an old laptop, but your way seems much better). I was going to build a MAME cabinet using it, but never got round to it. very good instructable.
rickharris says:
Sep 6, 2009. 7:44 AM REPLY Hi, I want to control my PC via the keyboard from an external microprocessor - My thought is to simply bridge the keys I want to use with a 4016 quad switch. Did you try this?
bassbindevil says:
Sep 13, 2009. 10:10 PM REPLY That should work. Or there are some general-purpose USB chips. Off the shelf things like the IOWarrior, the "CREATE USB Inteface", one at Madhacker.org. http://www.madhacker.org/usb_hid_keys.htm Another option is to look out for old USB specialized game controllers, or a USB gamepad. That may be more straightforward than going with dualling keyboards. I've run into various game controller gizmos at thrift stores, like the Nostromo Speedpad from Belkin, something called "The Claw", and a Microsoft thing intended for strategy games. The "The Claw" is almost ideal... it's just a USB microcontroller wired to a bunch of switches. Alternatively, don't overlook the analog joystick port... it supports several switch inputs. Even the analog inputs can be used: switch different resistor values across them. This allows multiple inputs using a single wire (plus ground). And finally, there's the parallel port; searching will turn up ways to use that for input and output. If you need software, Girder will accept a wide variety of input devices using plug-ins. Some older versions were freeware (or at least didn't expire when unregistered). http://www.promixis.com/girder.php
exabopper says:
Sep 12, 2009. 9:51 PM REPLY I've been wanting to try this for months. There are many MIDI programs that will take input from your keyboard as if it were a piano, but of course playing your keyboard is almost impossible unless you custom-label the keys. Now, all you need is your hacked keyboard and a kid's toy keyboard from a toyshop, a little wiring, and you have an effective MIDI instrument! Thanx!
bassbindevil says:
Sep 13, 2009. 9:39 PM REPLY Look out for scrapped electronic organs. Keyboard quality has to be better than a toy. Other options: leave the case intact, use all the keys, switches, pedals, and use the internal speaker and amplifier if it still works.
king_grimloc says:
Sep 12, 2009. 9:11 AM REPLY I did something very similar to this with a Commodore 64 I had that I modified to use a Mini-ITX motherboard. I ended up making a PC board that replaced the original one and routed all of the keys to mach the keyboards controller from a $10 keyboard I purchased for this purpose. The only thing I can say is that the PC board the controller is on is not usually very sturdy, so it won't take a lot of heat from your soldering pencil. You will also want to re-enforce the wires with silicone RTV. Sep 12, 2009. 8:06 AM REPLY Very interesting.....and since they toss keyboards on a regular basis at work, I can have a field day and not fear harming a good one :-) Most of the time, users eat too many pretzels, chips and cookies over their keyboards, and eventually they just stop working altogether. . .
Goodhart says:
avibank911 says:
how do you solder the wires without burning the PCB??
Azayles says:
Use a soldering iron, not a blowtorch.
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
Goodhart says:
Gee, looks like I'll never get to use my 100 A arc welder ever again.... ;-)
mdgnys says:
Oh I have one of those!!!!!!!!!!!!!!!!!!!!
1337pato says:
Burn
DavidHasselhoff says:
ROFL
ATG says:
LOL
Chromatica says:
lmfao
Kasm279 says:
lol!
-henry- says:
It's nearly impossible to burn the PCB when you solder, unless your soldering iron is WAY to hot.
Malfurious says:
Jan 7, 2010. 1:32 PM REPLY Using a material that has a melting point above 800F is brazing. Most likely, your soldering iron isn't designed to sustain those high temperatures. Are you using a material that requires your gun to be that hot?!?
-henry- says:
You realize that you responded to a post almost 1 year old FYI
WilderLust says:
Sep 11, 2009. 9:08 AM REPLY Wow! you don't need it so hot. most of the work i do is under 300 deg. sometimes when i have larger cables or large metal parts to solder i go up farther but 800 is really high for electronics. your element will last longer at lower temps too and you will not fry so many things. the solder i use melts around 250 deg. i would recommend you cool things down for electronics! cheers :-)
Sep 12, 2009. 10:45 AM REPLY Ty. i only keep it hso hot so i can get done faster :| Thanks for the warning. im gonna make it so it cant get past 450
-henry- says:
that's fine, anywhere from 700-900 degrees (F) is fine for soldering,
http://www.instructables.com/id/Hacking-a-USB-Keyboard/
Feb 18, 2009. 3:03 PM REPLY thnx cuz sometimes my dad gets mad when i put it that high. just wanted to make sure that i wouldnt damage anything. thnx again
thecheatscalc says:
by the way, what type of solder are you using? electronics solder is usually 350-400 degrees Fahrenheit...
http://www.instructables.com/id/Hacking-a-USB-Keyboard/