Do-it-yourself keyboard for your own hands. Joystick for computer from keyboard

CatBoard is an open source, homemade, ergonomic compact keyboard with many non-standard solutions, such as: non-standard hardware layout with standard keyboard shortcuts; quick auto-repeat of a pressed key; Fn layer with cursor control keys, number pad, function keys; separate keys for switching layouts; more convenient location of Ctrl and Shift; separate AltTab button; Macintosh compatibility mode, allowing you to work on it in the same way as on a PC; possibility of flashing without additional equipment; Possibility to install on top of a laptop keyboard. Thanks to open source, you can do anything with the keyboard, new firmware is uploaded in a matter of seconds, so you can experiment on the go.

Long historical part

It all started back in 2005, when I wanted to work with a truly ergonomic keyboard, but was not ready to order an expensive keyboard from abroad. I decided to develop the keyboard myself, because what’s easier is to buy buttons, take a controller from any cheap keyboard, and just connect the buttons in the same way as it is done in this keyboard. At that time I really liked the Kinesis Advantage keyboard, it was almost perfect, but I thought it was worth starting production with a flat keyboard, like the Maltron Flat.


Maltron Flat Keyboard

I already knew how to touch-type, I learned it thanks to a keyboard trainer Stamina. Before that, I tried to learn in Solo, but it annoyed me so much that I never finished learning, I went through all the exercises, but I still didn’t start touch typing. But Stamina was easy to learn, and when the typing speed reached 200 characters per minute, I was able to start working without looking at the keyboard. I learned to type both Russian and English text at once, went through the exercises one by one, thanks to this I was able to immediately start working fully using the blind method. I rearranged the buttons on my keyboard, thereby trolling my colleagues, it was even interesting to come up with different inscriptions on the keyboard, because the button caps are different on different rows, so it was necessary to rearrange them only on their own row, and it was advisable not to touch the fj, which had serifs on them (and they are important for touch typing, so that you can put your hands in the starting position of the print without looking).


Keyboard Stamina Trainer

Before doing anything, I found a Moscow company where I bought buttons Cherry MX Black with a reserve, and a programmable keyboard for trading terminals KBM-105 for experiments (index 105 is the number of buttons, matrix 15x7). Having drawn a diagram of the buttons, I began to think about how I could make a housing at home. Collected from scrap materials different designs, which now it’s a shame to show, in general nothing worked, it was both crooked and flimsy. Work on manufacturing the case stalled, but on the programmable KBM-105 I began to experiment with layouts.


Programmable keyboard KBM-105

At that time, a very unusual keyboard was produced NSK 535, everything about it was revolutionary, both the alphabetical layout and the shift keys on the thumbs. Looking at such a miracle, I even decided to try typing with just such shifts, but it seemed very revolutionary, and I returned the shifts back to the little fingers, fortunately, flashing the KBM-105 keyboard is very fast, you can change the location of the buttons several times a day.


Keyboard NSK 535 R

I worked on this programmable keyboard at home for several years, while at work I had a completely standard keyboard, there were no problems with working on two completely different keyboards, only it was much more pleasant to work on mine.

To quickly master new layouts on a programmable keyboard, I even wrote an online keyboard simulator Klavarog(http://klava.org/), so that you can work from any computer connected to the Internet without installing any programs, now everyone has started doing this, and at that time, if there were online simulators, they were only in Flash, and they did not work in Linux with Russian letters. At first it was a very simple simulator, there was not even a hint about the keys to press, just a picture of the keyboard. Although it still remains the simplest simulator, it is also very effective, because it was made for oneself. Beginners are offered a mode that allows them to literally master the location of all the letters in a day; there is no need to spend a week or two going through lessons that add one studied button at a time, as is done in almost all simulators.


Keyboard trainer Klavarog

At some point in time I decided that I would develop a new keyboard, and the project would be open. Created Wiki the site http://kbd.klava.org/, where I began to collect information about different keyboards, and began to look for any information on the development of a keyboard, because for my keyboard I already had to make my own controller, the standard one was no longer suitable. It turned out that I knew nothing at all about making keyboards.

What also happened was that I quit the office and began working at home, and even on a laptop; the matrix programmable keyboard was used less and less. Over time, the ardor disappeared; ordinary worries and affairs pushed the development of the keyboard into the background. But the idea was too intrusive, and I began to slowly think about how I could remake the keyboard in the laptop, because it was physically impossible to remake it, so software was used. First, I moved the cursor control keys to the main alphabetical block, if you hold down AltGr (right Alt), then some letters became arrows, at first they were VIM buttons hjkl , then I made the more familiar and convenient ijkl , it turned out that when you held AltGr the arrows as if they were jumping under your fingers. Then I placed the Ctrl key to the left of the spacebar, moving Alt to the left by one key, this turned out to be a very good solution. I even learned to work in Emacs for this purpose, it turns out on ancient keyboards Ctrl was located in the place of modern Caps Lock, it’s clear why I didn’t like this editor before, it’s because of the inconvenient location of Ctrl. It is necessary to take into account that this all applies only to touch typing; when typing with two fingers, the location of the keys does not matter of great importance, it's just a matter of habit.


Improved laptop keyboard layout

At one time it turned out that there was no work, and I decided to change the hated QWERTY layout (how my little fingers hurt from it when learning touch typing) to a more ergonomic one Dvorak, and with the help of his simulator began to study it. Just at this time, I made a special mode in Klavarog, in which it is suggested to type one a short word many times in a row, first slowly, then quickly, driving the new layout into your memory, very effectively. I’ve been studying for about a week now, things were going slowly, the speed was growing very slowly, and for some reason I forgot how to work in QWERTY, others didn’t have this problem, but I was scared, what if I had to do something urgent, and I forgot how to type , but I haven’t learned how to use Dvorak yet. And at this moment of timelessness I came across my old computer BK-0010/01, which had a phonetic layout JCUKEN, in it the Latin letters are located in the same place as the similar-sounding Russian letters in the standard YTSUKEN layout. The nostalgia for the times of BC was so overwhelming that I decided to make myself this layout and try to study it. It didn’t work out to do one on one, some frequently encountered letters were very poorly placed, and I ended up changing it quite a lot, and I have good reasons for rearranging each key. But in general, it still remained phonetic, and for the most part coincided with the old one. Having made a layout and stitched it into your operating system(at that time I had already started working in Ubuntu Linux), I began to study it in the simulator. And then a miracle happened, the process went so quickly that I increased my typing speed to 200 characters per minute (these 200 again) in five days, and started working in the new layout.


Soviet computer keyboard BK 0010-01


Improved JCUKEN layout

Now I was satisfied with everything except the location of the keys, and I was not satisfied with the long space bar, although on the laptop it is shorter than on conventional keyboards due to the additional keys on the bottom row. The time has come to make a keyboard, but it should be compact so that it can be placed on top of a laptop keyboard, and as small in height as possible. Since the keyboard should be located on top of the laptop, and on my Thinkpad there is a touchpoint right in the middle of the keyboard, which is higher than the level of all the buttons, I decided to make a hole on the bottom of the keyboard body, at first it was round, then I just added cat ears. From that moment on, my keyboard began to be called CatBoard =^.^=

I decided to make the case from aluminum, and began to look for a production facility where I could laser cut holes for the buttons and the outline of the case. Nobody wants to deal with small orders, most honestly write about the minimum order amount, some talk about it only after the order. To cut aluminum you need quite powerful laser, it’s not easy to find one, so I decided to make the case from sheet plastic or plexiglass. And then, thanks to Habr, I found a mention of the first one opened in Russia fablabe. I contacted the head of the FabLab77 laboratory, we met, I told about my project, and I got access to equipment with which you can do anything, they opened limitless possibilities. It was also lucky that at that time the Americans from MIT came and held a week-long seminar where they taught how to work with all their equipment, only open-source software was used.


Last day of the MIT workshop at FabLab77

In search of an ergonomic button layout, I made many mock-ups from plywood, on which I found the best layout, and it turned out to be almost the same as in the Truly Ergonomic and ErgoDox keyboards (I did not yet know about its existence). Well, this is not surprising, people’s hands are almost the same.

After the case was ready, and I was completely satisfied with the location of the buttons, I began to study how I could make a controller. At the same time, I began to assemble a mini home laboratory for soldering. I bought a soldering iron with power adjustment, assembled a box in which I placed a Dremel 300 with an attachment that turns it into a small drilling machine- Dremel Workstation 220. In this box I made a hinged lid on which you can work. Now the box always stands under the table, not taking up space in the apartment, and when I need to do something, I take it out and put it on the table.

At first, I decided to assemble the controller myself, at the same time assembling the programmer, and made it in the fablab on a Modela milling machine printed circuit boards, soldered them, but nothing worked, since the working programmer was only in the fab lab, I didn’t want to buy a new one, and I could only tinker with the boards at home. I found out that there are microcontrollers with a hardware implementation of the USB protocol, further search led me to ready-made controllers, such as Teensy, and our similar developments from Microsin, from whom I purchased AVR-USB162.

I decided to solder the wires not directly to the controller, but through a connector that I installed inside the case. Having gone to the fablab again, I laser-cut the case, which I decided not to have rounded edges; I drew straight lines around the blocks with buttons and got the current keyboard design. The controller was placed directly on top of the case, it is held on by a screw with a nut and washers, and the connector prevents the board from spinning. To prevent the wire from touching the laptop screen, I placed the controller closer to the middle of the keyboard. But this is what happens when you don’t think about this problem:


Richard Stallman and his OLPC laptop with HHKB keyboard

When developing the circuit, I realized that the buttons needed to be connected via diodes, so that there would be no situation where, when several buttons in different rows and columns were pressed, the controller began to think that a button from intersecting rows was pressed. Everyone knows this, but I didn’t know about it then. Cherry MX buttons have an empty space in which you can install either a diode or an LED. In order not to solder the diodes from the outside, I installed a small KD522B diode in each button, although I mixed up the polarity, it turns out that the location of the mark is not unified, you need to look in the reference book to see where the anode is and where the cathode is, so when connecting the buttons to the controller, I took my mistake into account.

When everything was assembled, all that remained was to flash the controller. At first I used the LUFA library, but I could not figure it out, because I had never programmed in C, and in fact I do not know this language. While looking for another solution, I found a simple keyboard scanning code that used a library from Teensy. The code turned out to have many errors, but it was no longer difficult to fix them; the most important thing was that it worked. I made the firmware in a couple of days, and the keyboard worked; I never would have thought that I could create it so quickly. Then, of course, there were weeks of fine-tuning it, correcting errors, adding previously unseen functions. And I did all this on a new keyboard.

Since the keyboard turned out to be divided, the hands are further apart from each other, and the palm rest on the laptop is not designed for this, so the hands began to rest on the corners of the laptop. I solved the problem using two mouse pads with gel pads, cut off the excess part of the pad, and got comfortable stands for hands to keyboard. Thanks to the straight line of the body, the pads were installed just perfectly.


CatBoard keyboard on top of ASUS EEE PC 701 laptop

What a pleasure it was to finally start working on something that I assembled with my own hands, and does not have those shortcomings that I am simply tired of, because I work on the keyboard every day, and every day it oppresses me. Go to any computer store and try to buy a keyboard that doesn’t have staggered rows, a legacy of mechanical typewriters, they simply don’t exist. I would understand if standard keyboards were perfectly ergonomic, but no, this standard is based only on the habit of people, and all new users learn again on these keyboards made in the old days (not in appearance, in fact).

At the same time, my main requirement was to use it on top of a laptop keyboard; my new keyboard fulfilled it; it will fit even on the smallest netbook - ASUS EEE PC 701, which has a screen diagonal of only 7 inches, as can be seen in the photo just above. Although I don’t work on this netbook, it’s quite possible that I’ll start using it somewhere on the road now, because now I don’t need to use its small keyboard when I have to squeeze my fingers together to place them on small keys.

Initially, there were flat caps with a transparent cover, purchased along with the programmable keyboard, later I installed black caps from WASD Keyboards, when I ordered new buttons, this time Cherry MX Blue (with a click) and Cherry MX Red (like the black ones without clique, but softer).

I decided to assemble the second keyboard because of the tightness of the Cherry MX Black, they have a pressing force of more than 60 grams, for blue and red ones from 45 grams. Pressing them was still normal, but holding them pressed, which is often required due to the presence of the Fn layer, no longer works, the finger gets tired.

Colleague suenot, whom we met at a meeting of Clavo Racers, joined in the production of CatBoard ][, and they asked to make one copy for the fab lab. Therefore, instead of soldering with wires, I decided to make printed circuit boards, two pieces for each keyboard, a connector is installed on the edge of the board into which the controller is inserted, connecting both boards, although due to the lack of ports I had to connect the boards with five wires.


Evgeny collects his white CatBoard ][

Milling such large boards takes a long time, so I decided to etch them. Usually they prepare for etching using photoresist or LUT, but I decided to do it using a laser, glued a vinyl self-adhesive film to the foil of the board, laser cut the film along the contour of the tracks, removed the excess, and etched it in an ammonium persulfate solution. The boards were made of gettinax, and my mistake was to cut them with metal scissors, they are quite fragile, in one place a piece broke off along with the track. I was already drilling at home with a Dremel, I didn’t want to bother with milling.


Board etching


Drilled board

The use of 1.5 mm plexiglass along with 3 mm colored plastic made it possible to make the keyboard body slightly thinner than in the first keyboard, made only from 3 mm sheets, which is why it was necessary to mill the protrusions for the button latches. The controller took a different model, more compact ( AVR-USB162MU). Installed two LEDs, blue and red, which show the current keyboard layout.


Bottom view

The keyboard layers are fastened with M3 threaded rivets with a notch and countersunk screws. Instead of threaded rivets, you can take more affordable rivets, knock out a nail from them, and cut an M3 thread inside.


CatBoard ][

CatBoard Keyboard Features

The most important thing is the Fn layer, the one that works when you hold down the Fn button under the right thumb. Its presence made it possible to make the keyboard very compact, and at the same time fully functional. I did the same on a regular keyboard, reconfiguring the operating system, although this did not work in all programs, such as Skype and Sublime Text. Now, not only has it become more convenient to work with the Fn layer, due to correct location the Fn button also works in absolutely all programs, and even in the BIOS, because when Fn is held down, the keyboard sends completely different key codes, instead of ijkl, arrow keys are sent, uo is Home and End, p; these are Page Up and Page Down, h - Enter, nm - Backspace and Delete, - Insert. The entire digital series becomes functional, i.e. Fn+1 is F1, Fn+0 is F10, and Fn+-= is F11 and F12.


I've been pressing the spacebar for a long time now right hand, so it was decided to use the left space as a shift. This turned out to be very convenient, because you can hold it while typing with the same hand, you don’t need to alternate your little fingers, the letter on the left is the right little finger, the letter on the right is the left little finger. With this shift you don’t even need Caps Lock, keep it pressed and type for as long as you like.

In place of the freed shifts, I installed a language switching function, on the left - RUS, on the right - LAT, just like on old Soviet computers. At the same time, I left the shift function on these buttons; if you press it quickly once, the desired layout will be turned on, and in other cases it is shift, and in some certain cases there may even be Ctrl.

To the left of the Tab button I placed a separate AltTab button; when pressed, Alt is pressed, Tab is pressed and released, and Alt is held. To switch to next windows, just press the regular Tab next to it, it’s very convenient. However, if this new button is pressed while Alt or Ctrl is pressed, it will work like a regular Tab.

Ctrl and Alt now press against the spacebar, with Ctrl being closer to it. Thanks to separate buttons for switching layouts, and a separate AltTab button, I almost stopped using the Alt buttons.


There is a fixed mode, called by Fn+AltGr, in which a number pad appears on the right half of the keyboard, and the same block with arrows appears on the left.


I have long dreamed of trying a quick auto repeat pressed key, which Jeff Raskin wrote about a long time ago. But I did it even better, for it to work it requires not a triple key press, but a double one, and it works thanks not to a fixed time, but to automatic adjustment to the user. The faster you press the button twice and then hold it, the faster the auto-repeat of the keystroke will begin and occur. At the same time, false positives are very rare and do not depend on the speed of the user. Tests show that this auto-repeat is twice as fast as usual. At the same time, I got used to it so quickly that I stopped using the regular one, it seems to me too slow, it starts slowly, it works slowly, although of course the second parameter can be easily adjusted, but the first one will not work, otherwise there will be false positives during normal printing. The only drawback is that turbo auto-repeat does not work in games where auto-repeat is not needed at all, but just a pressed key is needed, so for such cases I made it disabled using Fn+Esc.

In place of the Russian letter E I placed the letter E, which will be typed while holding down Fn. Now I always type Y, because now I don’t have to reach for it. In addition, ~ in the English layout turned out to be more convenient to type in this way.

Since I print not in QWERTY, but in JCUKEN, and there are separate buttons for switching languages, then I made my own non-standard hardware layout, and thanks to this it became possible to do something that no one had thought of doing before me, namely, keyboard shortcuts from QWERTY. After all, in order to keep the convenient Ctrl+XCV, they made the Colemak layout, and I get not only keyboard shortcuts for working with the clipboard, but also all the others. After all, in my JCUKEN I placed V in place of W only because Ctrl+W was very inconvenient, and I often pressed it accidentally, which led to unpleasant consequences. Now I’m returning back to FYWA, and this became possible precisely because of the standard keyboard shortcuts.

With the advent of additional LEDs that display the current layout, they are clearly visible with peripheral vision, and at the same time do not interfere with work, yet I made a function to turn them off, press Fn + Y, and the keyboard no longer lights up.

I often need to leave the computer, but since my keyboard does not allow me to close the laptop without removing it, I made a function blocking keyboards. By pressing Fn+RShift, the keyboard turns off the LEDs, stops accepting any presses other than the same combination, and sends the Win+L press to the computer, a combination that locks the operating system with a password so that someone else cannot use your computer while you are away.

We have already made a similar homemade product on our own, only in it we coordinated the joystick from the Dandy console with the computer hardware using a special program. Here we will simply convert an ordinary computer keyboard into a joystick.

What do we need? Any keyboard (preferably with a USB bus for convenience), but of course a working one. Any joystick from any console, from any manufacturer, even a non-working one is possible. The main thing is that another board on top fits inside it.

I took this “chubby” joystick.

I’ll tell you our problem briefly, I think you’ll understand everything.

I don’t know whether you know or not that the keyboard and joystick work in a similar way. Namely, each of these devices uses the principle of command encryption. This is done so that as few wires as possible can be removed from the device. For example, if you connect at least one wire to each button on the keyboard, you will end up with a lot. And so it was decided to encrypt them and convert them into impulses.

In the keyboard, unlike the joystick, the principle of cross-connection of buttons is used, that is, about a dozen buttons go to the keyboard board, and 4 or 5 from the board, depending on the device interface.

Let's get down to action. We take out the board from the joystick and use a screwdriver to cut off all the contacts from the original microcircuit.

Accordingly, you need to find out in advance which contacts on the board are responsible for which buttons.

The work is a bit complicated, it requires careful attention.


Every PC user faces the problem that after purchasing a system unit, not all ports begin to work well. Well, you shouldn’t change your computer for the sake of it, and not everyone will have to repair it, but you can make an additional USB port on the keyboard.

Watch the video and make yourself another port for a flash drive on your keyboard

In order to make a port, we need:
- soldering iron;
- needle file;
- glue gun;
- screwdrivers;
- USB socket. The socket can be removed from an old adapter or USB extension cable.


First, we need to unscrew all the bolts on the keyboard that are located on the back cover and get to its insides.


Next, take the USB adapter and remove it from the shell. We should still have an iron thing in our hands. If it is difficult to simply remove, then cut off the surface with a stationery knife. Don’t forget to leave 10-15 centimeters of wire; there should be 4 of them coming from any USB.


We make markings on the keyboard in the place where the new USB port will be located. It is better to do it from the very edge so as not to damage the boards and wires that run in the center of the keyboard.

Now, using a hot blade, we cut a hole on the plastic (keyboard) for the future USB.


To make it easier to remove a piece of plastic from the keyboard body, heat not only the knife blade, but also the self-tapping screw. Take the self-tapping screw with pliers and insert it into the center of the part of the plastic that you want to remove.

After removing the excess plastic from the keyboard body. Take a file and clean all sides of the hole with it.

When the hole is ready, insert the port from the flash drive into it. In order for the flash drive to stay there well, secure everything glue gun. Don't skimp on glue.

The main work has already been done, all we have to do is secure the wires. We can do this with ease, since the wires match in color. We connect red to red, black to black and then by color.


To connect the wires, you need to remove the braid and simply solder the wire of the required color.

At the junction we fasten everything with hot glue.

A broken computer keyboard can be an inspiration and the main material for creating decorative and useful things. So what can you do with an old keyboard? 7 interesting ideas We'll see now.

1. Decorations from the keys of an old keyboard

You can make a variety of jewelry and accessories from keyboard keys. Take a base for earrings, a ring or a bobby pin and glue the key. You can select key combinations with meaning, for example, Cntrl + C, Cntrl + V, and so on.

To make a bracelet from a keyboard, you need to make two holes on both sides of the key and stretch a thread - an elastic band or a thin cord.

And for men, you can make stylish cufflinks from keyboard buttons!

2. Desktop accessories from an old keyboard

Keys from a broken keyboard can be used as decoration for various objects. On your office desktop, a stand for pens, a frame for family photographs and a work diary with a cover of keyboard buttons will look very harmonious and relevant. The process is very simple - you need to glue each key to the selected object.



3. Shelf made from an old keyboard

Without disassembling the entire old keyboard, you can turn it into hanging shelf for books. The main task is to securely attach it to the wall.

4. Bag made from an old keyboard

For a business lady with a great sense of humor, you can make such an original bag or clutch. A great way to update an old bag with cracked leather or frayed fabric.

5. Clock from an old keyboard

Use function buttons F1 - F12 for the clock dial. The base can be made from a CD to support the clock theme.

6. Furniture made from an old keyboard

Nolan Herbut, an American designer, used about 20 keyboards to create an unusual Wolfgang bench with a massage effect. More than 2000 keys are built into a wooden base, and not just glued or screwed tightly. Each key is pressed exactly the same as on a full-fledged computer keyboard, with a characteristic sound and tactile sensation.


7. What else can you make from an old keyboard?

In addition to more or less practical things, keyboard keys can serve as material for creating large-scale works of art. For example, huge paintings - mosaics with portraits of famous people.