21 ms·
Making My Own USB Keyboard from Scratch
- keithnz 8y agofunny, I was just looking at a keyboard stream on twitch for https://ishtob.net/hadron/hadronv3-groupbuy https://ishtob.net/hadron/hadronv3-groupbuy and I was just browsing the open source code used in the keyboard here https://github.com/qmk/qmk_firmware https://github.com/qmk/qmk_firmware
- tramGG 8y ago$255 for a keyboard? Wow. What are the more higher end keyboards you've seen?
- marcinzm 8y agoIt's $255 and doesn't come with any switches from what I can tell. Not the person you're responding to but I've heard good things about the UHK: https://ultimatehackingkeyboard.com/ https://ultimatehackingkeyboard.com/
- ComputerGuru 8y agoI didn’t like it, despite waiting a couple of years (I think) for mine to ship. The lack of Esc is just plain stupid and needlessly “special” for a hackers keyboard, especially with zero space constraints. The keys themselves I’m not a fan of, but that’s because nothing beats the buckling spring keys I’m used to - so not counting that against them. Build quality is great, however.
- neonroku 8y agoCan't you remap one of the other keys to be escape - I think for those who care keyboard layout is highly personal - I can find somebody has designed a keyboard that looks great and then make layout choices I find very strange. But if the keyboard uses qmk then I can easily fix that. If you're not happy then build your own - or buy a unicomp board and replace the controller so you get the best of both worlds - buckling spring and programmable keyboard.
- jwr 8y agoI have the UHK, I really like it (it is so far the best keyboard I've used). I could make use of another row of keys, but they chose to minimize size, which makes the keyboard nicely portable (especially if you put the two halves together back-to-back). A big part of the appeal of the UHK is the agent, which lets you configure the keyboard any way you want. Not all keyboards let you do this, so it's often an apples to oranges comparison.
- in_hindsight 8y agoVE.A2 is probably $500 or $400 at least now
- xienze 8y agoThat’s nothing when you venture into the world of Korean custom keyboards. ~$500 for the case (usually milled out of quarter-inch thick aluminum with a solid brass weight) and PCB. Then add switches and custom key caps.
- joeblubaugh 8y agoI have a Keyboardio Model 01: https://shop.keyboard.io/ https://shop.keyboard.io/ The Kickstarter version cost $250, they go for $329 now. It's really comfortable, and I use the palm-switch and thumb keys very naturally.
- _jal 8y agoThat's not much for a high-end keyboard. Spend some time browsing http://reddit.com/r/mechmarket/ http://reddit.com/r/mechmarket/ . You can pay north of $1K if you want to, especially on a rare board; new ones are commonly around $500. Just one recent example: https://zealpc.net/collections/custom-keyboards/products/gb-xeno-75-custom-keyboard-kit-full-plate https://zealpc.net/collections/custom-keyboards/products/gb-... .
- agrahul 8y agoIf you’re open-sourcing a project, you can get a real USB PID instead of hijacking someone else’s: http://pid.codes/howto/ http://pid.codes/howto/
- blakesmith 8y agoOh nice, didn't know that! Thanks for the info!
- vemv 8y agoThe keycaps can't be easily DIYed right?
- blakesmith 8y agoThere are a lot of people who 3D print keycaps I believe. I skipped that and bought DSA blanks from Signature Plastics.
- wongarsu 8y agoKeycaps are fairly straightforward to 3d print. If that's not DIY enough you can make a mold and cast them from silicone (the method used by most artisan keycaps) or make them out of wood.
- ThatPlayer 8y agoI have seen a parametric keycap library here https://github.com/rsheldiii/KeyV2 https://github.com/rsheldiii/KeyV2 But standard FDM printing will not get you keycap that are smooth on the top, as they tend to be sculpted to fit a finger better, and you're still looking at ~0.4mm layers at best. You may be able to do it with SLA 3D printers which are able to do higher resolutions than FDM printers. https://imgur.com/a/AalpV1r https://imgur.com/a/AalpV1r is an interesting project that 3d printed the keycaps too
- newman8r 8y agoIt's hard to get the mounts on the keys just right on an FDM printer too, at least in my experience.
- Benjamin_Dobell 8y agoYeah, you can 3D print key-caps reasonably easily. Sorry, I can't remember the exact 3D model, but there's a free Cherry MX switch model around somewhere that surprisingly has the entire interior mechanism modeled. You can pull out the key mesh and tweak it a little bit to meet your needs, then it prints really well and fits nicely on Cherry (or Gateron) switches. There's also a handful of pre-created 3D printable keycaps on Thingiverse, however when I last looked into it I wasn't very happy with them. Although, I must admit, whilst I've had all my components (including RGB LEDs and transparent Gateron switches) for what must be over a year now, I still haven't gotten around to finishing the project!
- samstave 8y agoI have a design wish for people who make things like this: “row modules” Basically, as an example - i wouldnt be fond of the size of that spacebar, and would like other modules. What if each horizontal row of the standard length on a qwerty were its own module, and you can snap several together to make the board you want. Want a touchpad? Snap it to the base or side. Want a touchbar oled strip: snap it to the top. 9-key? No problem - gamer config wsad side module? Yep. Want to just pull out the small qwerty section for some reason - just unsnap whatever you need. Also, from a connection perspective, they should be little round rare earth magnet cylendars in dowl posts and you just mate the pieces this way. Fyi, Daiso Japan carries these in packs of 8 for $1.50.
- Palomides 8y agoI'm curious why you want modular parts rather than just designing a board that has what you want? Keyboards are surprisingly easy to design now (as seen in this article), and you can design things that would be completely unreasonable for any modular system.
- jrockway 8y agoIndeed, and this guy did it the hard way. Get a teensy, some switches, diodes, and wire, and read this: https://github.com/qmk/qmk_firmware/blob/master/docs/hand_wire.md https://github.com/qmk/qmk_firmware/blob/master/docs/hand_wi... There is no need to spend any time on the software side of things. It's already been done to death.
- Palomides 8y agoeven if you want a custom plate, PCB, case, firmware, you can use community-developed web tools like these to do it all: http://www.keyboard-layout-editor.com/#/ http://www.keyboard-layout-editor.com/#/ https://kalerator.clueboard.co/ https://kalerator.clueboard.co/ http://builder.swillkb.com/ http://builder.swillkb.com/ https://config.qmk.fm/ https://config.qmk.fm/ A neat response to this article would be someone making a keyboard using only these tools.
- snazz 8y agoFor anyone who’s tried both: are big keyboards with lots of modifiers or little keyboards with “layers” more comfortable and functional for you? I currently have a full-size mechanical PC keyboard and am debating buying a Planck.
- Palomides 8y agoit's a tradeoff between more keypresses vs. more finger/arm movement; also the topic is pretty contentious and nobody will give you an unbiased answer. My biased opinion is that layer-based boards without thumb keys are horrible, something like the Atreus is exclusively better than the Planck. The Planck was designed to be small, not ergonomic. The popularity of the layout is (imho) due to good market timing, low cost, competent business operation, and good electronics design work.
- CarVac 8y agoI have a TKL and a 46-key ergo keyboard. On my TKL I miss having lots of thumb keys for layers; I have backspace on a layer. On my Mitosis Anaphase, I occasionally miss having dedicated punctuation from my big board.
- dsissitka 8y agoI think it depends on how you use your keyboard. As far as orthos go I went from Kinesis Advantage to Planck to JJ50 to 75Keys/XD75. I use a lot of keyboard shortcuts and the Planck didn't have enough keys for me. I think I could've made the JJ50 work but the extra keys on the 75Keys/XD75 are really nice to have. Typically people put them in the center and it's almost like having a split keyboard. If you use a lot of keyboard shortcuts I would suggest starting big and working your way down.
- jwr 8y agoFor what it's worth, I use an Ultimate Hacking Keyboard (UHK, https://ultimatehackingkeyboard.com https://ultimatehackingkeyboard.com) and I really, really like it (have been using it for about 6 months now). I do not like the "ortho" keyboards, and I definitely need my keyboard to be split in the middle. What I love about the UHK is the programmability: I can make the keyboard do lots of things, which makes switching between OSs much easier. The UHK makes heavy use of the "layer" concept.
- niwo 8y agoThis project looks nicer than most first efforts. Some random tips for anyone who wants to do something similar, with reservations for that it has been awhile: 1. Get a through hole supported usb connector instead of a pure smd one, since the latter likes to fall off. 2. I would avoid routing under the switches for durability, this might just be superstition though. 3. You can route the x and y of the matrix on different sides of the board to make things easier. 4. If you want to pick and place or wave solder it is probably easier to have the smd and through hole parts on different sides of the board. 5. No reason not to use the supported switch footprint, especially since you can connect your ground planes with the additional holes. (well, I guess space is a reason but still). 6. If you are going to assemble by hand, make the pads longer as needed. Probably especially on the microcontroller and diodes. 7. Solder in order of cost and success rate. 8. Always add switches, leds and connectors for debugging even if you don't intend to use them. 9. Some traces are quite close to the center hole, which might also be too small? Anyway, some margin is good for reliability/yield. (especially mixing 'technologies' e.g. holes/edges and traces). Edit: Oh, I forgot. You might consider scripting the placement of the switches/diodes.
- tux1968 8y agoSorry for being thick, but I just can't work out what you mean by suggestion #5. What does it mean to use the supported switch footprint? How could you use an unsupported one? What does it mean to connect your ground planes? What do you mean by additional holes (compared to what)?
- PowerfulWizard 8y agoI think OP is referring to the "PCB mount" version of the cherry keyswitches which has two extra supporting plastic pins. The other "plate mounted" version doesn't have them. Nothing about the PCB mount version prevents you from using a plate but it requires two extra holes per switch. https://support.wasdkeyboards.com/hc/en-us/articles/115009270628-Plate-Mounted-vs-PCB-Mounted-Switches https://support.wasdkeyboards.com/hc/en-us/articles/11500927...
- 8y ago
- barbecue_sauce 8y agoI'm not a mechanical keyboard guy. Is it as difficult to type on a qwerty grid layout as it seems like it would be?
- shiveringking 8y agoIt takes a couple of hours of getting used to.
- rolleiflex 8y agoDoes anybody know if there’s anything inherent in this that makes it have to be QWERTY in layout, or in shape? What I’m thinking about is to actually make a custom physical user interface. Less of a keyboard and more the bridge of USS Enterprise.
- nexuist 8y agoI would suspect this same line of thinking is what led to the Touchbar on new MacBooks.
- bonestamp2 8y agoYou could make it whatever shape you want. Then program it to emit whatever usb key codes you want (there are existing libraries to do this quite easily). This one happens to emit standard qwerty key codes, but there are many more that do other things. For example, there are standard key codes to launch a browser or the calculator (and some keyboards have buttons to do that too). You could also make it emulate any kind of standard usb HID (human interfact device). This one is a keyboard, but you could make something that identifies itself as a mouse, game controller, etc.
- jon-wood 8y agoMy Ergodox is configured so that hitting a particular key switches hjkl to mouse control, with clicks on the other hand. I can’t say I use it often, but it’s nice for times when you just want to click a single thing and then get back to typing.
- bonestamp2 8y agoThat is great. I remember having a microsoft keyboard back in the day that had a mouse click button and it was surprisingly useful.
- blakesmith 8y agoNope! In fact, I run mine with a Dvorak layout by default. A lot of people who use the QMK firmware do all kinds of custom modifiers, macros, and what not. And if you're doing your own PCB, you can arrange the buttons any way you want, with any switch type.
- mntmn 8y agoI love stuff like this. We made a whole laptop in this spirit, with a custom USB keyboard, optical trackball, motherboard and 3d printed/cnc milled case, also with KiCAD: https://mntmn.com/media/news_md/2019-01-14-status_update_on_reform.html https://mntmn.com/media/news_md/2019-01-14-status_update_on_...
- carroccio 8y agoCool. Please contact 36c3 to have dedicated space and punish even more diffusion material!!
- blakesmith 8y agoWhoa, sweet project. Your assembly video is drool worthy cool. I've thought about doing my own laptop some day, but figured I'd work my way up to that difficulty with some other smaller projects to keep learning. Any advice to share for doing a custom laptop?
- neonroku 8y agoCool project! For folks interested in doing this themselves there are some communities out there - others have mentioned qmk, here are some useful forums to check out: * https://www.reddit.com/r/MechanicalKeyboards https://www.reddit.com/r/MechanicalKeyboards * https://geekhack.org/ https://geekhack.org/ * https://deskthority.net https://deskthority.net Depending on your level of interest/commitment you don't have to design your PCB and software from scratch, there's a spectrum from designing your own PCB, case, etc. to putting together components designed and sold by somebody else.
- Solar19 8y agoNice. This reminds me of some old patents I like for optical keyboards, e.g. https://patents.google.com/patent/US4379968A https://patents.google.com/patent/US4379968A Though real optical would require optical equipment in the desktop's or laptop's chassis or motherboard, and OS support, since it wouldn't be USB at any stage.
- mncharity 8y agoHas anyone seen keyboards with non-traditional touch surfaces? Such as trackpad keycaps? Backstory: My fingers slide smoothly across my ThinkPad laptop keyboard, so I was playing with optical hand tracking (with a surface mirror to better track touch) to make the entire keyboard (and surrounding laptop) into a multitouch surface. There were occlusion and jitter issues, even with fingernail markers, and I set it aside while still not quite working. But I was left thinking "I should get back to this" rather than "never again". Stroking a keycap as a trackpad seemed nice, even already having a touchpoint. Merely touching modifier keys (emacs) rather than having to press them. With a 3D display, I overlaid video of the keyboard, slightly above the screen plane so it was easily seen but only moderately annoying. And thus could overlay a multitouch control panel that doesn't require shifting attention from the screen, or hands from the keyboard. With screen-comparable VR/AR seemingly only a year or three away now, with attendant changes in UI constraints, there seems an opportunity to escape decades-old HID fetters, at least with professional UIs.
- kragen 8y agoYeah, Apple got their multitouch technology in 2005 by buying Fingerworks, the startup that made Touchstream keyboards, which were sort of like a giant single trackpad with key areas on it. Now that every Android phone and tablet has this feature, you could maybe use a tablet or two as a reconfigurable keyboard. Myself, I really want more touch feedback from my keys, not less, but to each her own!
- secstate 8y agoI don't think OP is referring to a touch keyboard, but rather that the keycaps of each key would be one part of a larger multi-touch surface. As your finger left one key you could sort of "guess" the direction it was going and have something close to one big multi-touch panel that was composed of smaller surfaces. But I could be wrong as well.
- FPGAhacker 8y agoI had this idea a while back as well. What brought it to mind was wishing I didn't have to take my hands away from the keyboard to mouse around. Anyway, Apple has patents covering this idea. I believe 9,041,652 is the one I'm thinking of.
- userbinator 8y agoOne suggestion I have is to not mount the USB connector on the board itself, but instead on the "case" with a short pigtail leading to the board. There's a reason the majority of PC keyboards have a captive lead which runs into a strain relief on the case --- to keep the load off the solder joins when the cable moves around. Interesting thought: The microcontroller in that keyboard is more powerful than the first IBM PC.
- zacharycohn 8y agoNice job! Did you consider 3d printing any components?
- blakesmith 8y agoThis project was more about learning the schematic, PCB, firmware and laser cutting work. There might be some fun learnings from 3D printing the keycaps, but I didn't want to expand the scope of this too much, since there were already quite a few "risky" parts of the build (given my current electronics skillset). The top and bottom plate design was mostly about simplicity.
- mellow-lake-day 8y agoThis is some great quality content! Great project scope, execution, and write up.
- blakesmith 8y agoThanks for the kind words. It was also a lot of fun, and full of good learnings for future projects.
- artificialLimbs 8y agoSweet. Words per minute?
- timonoko 8y agoI made an USB-controlled relay from old keyboard circuit board. The relay is connected to the Scroll-lock LED, which is totally useless otherwise. Which means I can switch the relay on from keyboard or bash-script. At the moment the relay is connected to the ambient light in my lair.
- deleted 8y ago[deleted]
- jamisteven 8y agoWhere does one find the time for such activities.
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- franzwong 8y agoThere is a shop in Japan for DIY keyboard https://japantoday.com/category/tech/japan%E2%80%99s-first-do-it-yourself-keyboard-specialist-shop-opens-in-akihabara https://japantoday.com/category/tech/japan%E2%80%99s-first-d...
- deleted 8y ago[deleted]
- petercooper 8y agoWhat is it like typing on a keyboard that's just a grid? Every keyboard I've used has had each row be shifted slightly which seems to make touch typing easier.
- alfonsodev 8y agothat's a legacy from typewriters, they had to shift the rows to stop the metal pieces that push characters to collide with each other. But I've never tried typing in a grid. I'm also curious.
- Joe8Bit 8y agoI really like it, it takes a little getting used to though. Some people claim all kinds ergonomic benefits or negatives with orthos but I haven’t noticed a difference. I used a Planck as my daily driver for about 6 months before finally getting around to building an Ergo.
- dkersten 8y agoI find typing on a grid much more comfortable and pleasant than typing on a traditional staggered layout. As an experiment, place your fingers on the home row and naturally curl them out/up or in/down and see how straight or curved the path they follow is. For me, on a normal keyboard, I find that the buttons above the home row are positioned well for my fingers but for the ones below, my fingers naturally curl over the gap between the keys, meaning I have to also bend sideways. With a grid I can press both the keys above and the ones below without any sideways motion (for the four keys on each hand above and below the home row testing keys). Nowadays I use a kinesis advantage, though, which has not only grid layout but also has them in a curved height to more naturally let your fingers reach the rows without any additional movements and I love it. But even on a flat keyboard, I find a grid works better for me.
- ferongr 8y agoSo much effort just to type on Cherry browns. Without the stiffness of a plate mount even.
- vfinn 8y agoThis may be irrelevant, but I've long wondered, do we really need the buttons at all. Couldn't we just have a "sensory board", where each individual could initialize the board using their hand movement / finger press patterns to individual letters and/or words based on probabilities.
- pjc50 8y agoThere have been a couple of attempts at this: projection keyboards, Magic Leap. The technology is fine but the learning required to type on something invisible is considerable.
- secure 8y agoIf you’re into custom-made keyboards and keyboard parts, check out my Kinesis advantage replacement controller project: https://michael.stapelberg.ch/posts/2018-04-17-kinx/ https://michael.stapelberg.ch/posts/2018-04-17-kinx/ (only 0.2ms of input latency!)
- willtim 8y agoNice work! It would be interesting to compare the latency to the new Kinesis Advantage 2 keyboard, which has brand new firmware.
- Aardwolf 8y agoHey it looks great. Question about the circuit: is it NKRO, or is there any shadowing or ghosting?
- spsrich 8y agolove the colour. Took me right back to the Data General days.
- larrybeck 8y agointeresting
- subjoriented 8y agoOnce I pulled a prank on a colleague by setting up a 555 timer inside their keyboard so that alt+f4 would constantly get pressed (every ~1 second). Because that friend was a software hacker, I knew he would look for rootkits and all sorts of nefarious software issues that could lead to this behavior. Anyhow, he did eventually figure it out (not after he was sure his BIOS was infected - yes this was 2007). What I learned during that prank was that keyboards are very complicated. A keyboard is essentially a giant switching system where pressing keys closes circuits, and a microprocessor looks to see what lines are high/low and infers which keys have been pressed. There's whole systems designed around avoiding "ghost keys", which arise because the number of combinations of possible simultaneous button presses of the switching system far outnumber the possible combinations of signals.
- brokenmachine 8y agoIf every key has a diode then you won't get ghost keys. That's how NKRO keyboards work.
- diimdeep 8y agohttps://github.com/diimdeep/awesome-split-keyboards https://github.com/diimdeep/awesome-split-keyboards
- kakwa_ 8y agoReminds me of the time I rewired an old Mac SE keyboard to an USB keyboard controller. Basically, I took an USB keyboard controller from a cheap secondhand Dell keyboard, reversed its matrix, and then rewired every combination to the USB controller board using a wires peeled off from an IDE connector. Very time intensive, and to say the truth, not really working well in the end, but, hey, I was a student at the time. It was far less ambitious than the titled project, but here are the pictures: http://blog.kakwalab.ovh/IMG_6920.CR2.jpg http://blog.kakwalab.ovh/IMG_6920.CR2.jpg http://blog.kakwalab.ovh/IMG_6921.CR2.jpg http://blog.kakwalab.ovh/IMG_6921.CR2.jpg (yes, it's a mess).
- kevintb 8y agoIncredibly cool project!