How to cook IBM Model M

Published on January 24, 2018

How to cook IBM Model M

    You probably heard about this keyboard. IBM Model M is called the "best keyboard for typing", "the legendary unkillable keyboard", by all means adding "these no longer do." To posts on Reddit about gaining Model M, they often add to congratulations the wish to “enjoy this keyboard over the next decades”. What is so good about IBM Model M, how is it bad, and how can it be improved?


    A bit of theory. IBM Model M, in its most famous modification under the name IBM Enhanced Keyboard, was produced from 1985 to 1999, and in a slightly modernized form (USB, Win-keys, later - a smaller case) continues to be produced to this day by a small Unicomp company.

    The main highlight is the buckling spring mechanism (“curving spring”), to which we owe tactility and a ringing click. If you are interested in details, design features and a list of modifications, then you should read the article in the English-language Wikipedia (you should translate it) and in the Deskthority encyclopedia .

    Glitter and poverty IBM Model M

    First about the good. Here, for what love IBM Model M:

    • The mechanism is buckling spring. The same correct tactility, dear to the heart of any lover of mechanical keyboards. The abrupt change in the pressing force that occurs at the moment of spring bending corresponds exactly to the moment of operation. Cherry MX blue clickers and their clones are somewhat similar, but they have a trigger point, and you won't mix up buckling spring.
    • Durability. Even a little simplified fourth-generation keyboards and Unicomps made on worn-out equipment have a robust body, such a keyboard can be fought off in the case of a zombie apocalypse. The case and the keys are made of PBT plastic, which, unlike ABS, almost does not turn yellow and does not wear out over time (keys worn to gloss for many are unpleasant to the touch). However, these strengths and durability are relative, I will discuss this in more detail below.
    • A little more about the keys. The keys are located on a curved surface to facilitate access to the upper rows. In keyboards with modular switches, such curvature has to be simulated by making keys of a different profile. Model M uses the keys of one profile, as a result - they can be easily reversed in case of switching to alternative layouts (for example, Dvorak or Colemak for Latin). In addition to all in most Model M, you can not pull out the key entirely, and remove only the upper part. The inscriptions on the keys are made by thermal sublimation, in which the dye impregnates plastic to a depth of several tenths of a millimeter. Taking into account the high durability of PBT plastic, the inscriptions turn out to be practically eternal, only double casting is more reliable (doubleshot), used mainly for ABS plastic.
    • Weight. It is unlikely that you will regularly move this keyboard, the dimensions are not the same. For stationary use, a lot of weight is a plus - the keyboard weighing 2.5 kg is difficult to move with random movement.
    • The combination of vintage and mass release. Two decades of production have done their job. Despite the fact that many Model M ended their lives in a landfill or recycling center, enough for a long time for all those in need. The efficiency of the surviving copies, as well as the livestock of newcomers continues to support Unicomp, which produces parts for almost all generations of the IBM Enhanced Keyboard.

    There are no perfect keyboards. Here's what's bad in IBM Model M:

    • Noise. In the 1970s, in the USA (this process took a long time), people were transferred to computer keyboards from typewriters, and there was a shortage of keyboards. In some keyboards there was a solenoid, which produced an additional clatter when the key was triggered. Over time, everything changed, and in most cases your office colleagues or relatives in the apartment will not be happy to have “audio-tactile feedback”. The vibration of the springs can be extinguished by making the so-called floss mod - a piece of dental floss is inserted into the springs, the ringing of the springs disappears almost completely, but at the same time the tactility decreases.

      Dental floss mod . Reduce noise IBM Model M by installing segments of dental floss in the spring. The author is Chris Satterfield (Deskthority wiki, publick domain). Source .

    • Lack of modularity. A “sandwich” made of a steel plate, rubber gasket, membranes, hammers with springs and a plastic panel with “wells” functions as a single unit. Keyboards with separate mechanical switches (Alps, Cherry and compatible) are much more convenient in this regard: the idle switch can be re-soldered in a minute, dozens of switches are available for every taste, they can be arranged on the keyboard as you like. In the case of buckling spring repair takes a lot of time, and the modification of the layout becomes extremely difficult.
    • Strength and durability are relative. It is worth remembering that the appearance of the Model M was dictated by the need to drastically reduce the cost of production in comparison with its predecessor, Model F. In short: IBM Model F also uses the buckling spring mechanism, but instead of a membrane, a curved printed circuit board with capacitive sensors was used. The predecessor supported the NKRO (see below), was more durable, and the capacitive sensors provided greater durability.

      The membrane in the Model M does not look like a membrane in cheap 1000-ruble keyboards, there are no “bumps” with a graphite layer(Editing from 01/24/2017: it looks like I’m behind the times and I don’t understand the device of modern membrane keyboards). It consists of two plastic sheets with contact pads and a blank sheet that separates them with holes at the site of the contact pads. When the spring is bent, the hammer attached to it hits the pad of the upper sheet of the membrane through a thin rubber gasket, and the pad closes on the lower sheet. I have never come across a killed membrane in any Model M, but it has a weak spot - a contact cable, the tracks can be damaged by bending the cable strongly by negligence. Soldering these tracks is almost useless, especially in places of bending. Only a conductive marker or self-adhesive copper tape remains, but in most cases it is better to order a new membrane in Unicomp.

      Bundle assembly due to burst rivets. The author is Ripster. Source .

      The Achilles' heel of the IBM Model M is the fastening of a “sandwich” with a plate and membranes. The top plastic panel has numerous pins, which, after being assembled at the factory, simply melt, forming a kind of plastic rivet. Obviously, such a construction makes repair of these Rivets very much difficult, but over time, as the plastic ages and under the influence of vibration (especially if the keyboard owner in a fit of anger begins to hit the keys with all his strength), these rivets begin to collapse. The “sandwich” stratifies, some keys start to work poorly, leading to the need for a strong push, which is why the neighboring rivets also start to break down. On the elimination of this trouble just takes the bulk of the time when repairing the IBM Model M.
    • The main disadvantage of the membrane design is the absence of NKRO (No key rollover), that is, the ability to perceive the simultaneous pressing of a large number of keys. With normal typing this does not interfere, but in games there may be problems. The tracks from each key on the membrane can not be spent, they should be wide enough. Diodes for building a classic keyboard matrix do not solder to the membrane either, so the Model M keyboards support only 2KRO , that is, they perceive simultaneous pressing at leastany two keys. It was not for nothing that I selected the word “minimum” - in fact, not everything is so bad, since the topology of the rows and columns of the membrane does not correspond to the physical location of the keys. For example, you can press W, A, D and R at the same time (4 keys), but W + S blocks almost all the keys of the middle row.
    • Interface. Even if your computer has a PS / 2 connector, then the IBM Model M keyboard in it will most likely not work because of abnormally high power consumption. Most inexpensive adapters won't help. Or you could get a terminal variant with an RJ-45 connector. This problem is easy to fix. Using an inexpensive microcontroller board with ready-made firmware, the IBM Model M will get a USB interface and all the delights of modern programmable keyboards in the form of several layers and macros.


    Dealt with the advantages and disadvantages. If you weighed all the pros and cons, thought and bought IBM Model M, then, most likely, will get in a non-ideal state - the production of these keyboards was discontinued in 1999. If you do not want to repair, the vintage of the equipment does not matter, but you definitely need a mechanical keyboard with buckling spring, then it is better to take a new Unicomp. Classic Unicomp with a talking title Classic (there is even a Classic 101, almost like two peas in a pod similar to the 101-button IBM Enhanced Keyboard with the exception of the type plate) or a little less cumbersome Ultra Classic will cost only $ 84. Even with the delivery (about $ 40) it will be inexpensive against the backdrop of the modern renaissance of mechanical keyboards. The difference in quality will be (slightly curved seal on some keys, not so neat looking body),

    If you need exactly the "same one", then you should carefully examine the keyboard when buying. Virtually any killed "most indestructible keyboard in the world" can be recovered, but it costs time and money.

    • It is desirable to get a whole body, without cracks and chips. The new case from Unicomp will be different from IBM's, taking into account the cost of delivery, it is easier to completely buy Unicomp.
    • Keys Missing keys (entire or upper caps) - a little trouble, but can lead to additional cash costs. The sellers of IBM keys on Ebay may not be necessary, and the minimum cost of delivery for Unicomp is almost $ 15.
    • Keyboard operability can be immediately determined not always due to the lack of a PS / 2 port in place (even its presence does not guarantee success ). Do not carry the external adapter with you. Try to at least touch the performance of the keys. All should work with about the same click. The absence of a click may indicate damage to the spring / hammer, but most likely it is due to detached plastic rivets. With the order of springs, the same story as with the keys is a trifle with possibly expensive delivery, but you should not worry about the bundle.
    • If you failed to connect the keyboard when buying and it turned out to be a dead controller, then this can also be fixed. You just have to solder not the converter, but the controller entirely , having obtained connectors for connecting a loop from the membrane (or using existing ones).

    Actually, for the repair you will need the following:

    1. A 5.5 m (7/32 inch) socket wrench to unscrew the four self-tapping screws that hold the keyboard case. Inch end keys do not lie in every household, but, like many things now, this key is easier to order on Aliexpress. If you don’t repair Model M and Unicomp more or less regularly, you can save money by making a key from a ... ballpoint pen! It is necessary to melt the end of a suitable plastic handle with a cigarette lighter and quickly attach it to the bolt head.
    2. M2 × 8 screws and nuts - 58 pcs. Small screws can also be a problem, usually you can find M3 and more in hozmagi. On Aliexpress, I managed to find them from 200 pieces, but for a single repair it may seem unnecessary to you.
    3. Spare parts from Unicomp . Keys, hammers + springs (Pivot Plate & Spring Assembly), fluoroplastic stabilizer inserts (Stabilizer Insert), membranes. They even have stickers on the window with LEDs (the corresponding classic IBM is called “Pebble LEDs on Bottom”). For reference, the color of IBM's gray keys (modifiers, arrows, Escape, etc.) in Unicomp is called pebble . Immediately throw something to order before the full diagnosis is not worth it because of the expensive overseas delivery.
    4. Teensy 2.0 or Arduino Pro Micro. On the one and the other, you can run TMK or Soarer's converter. Pro Micro is cheaper, but it is a little harder to flash and the USB cable does not come with it. Chasing the originals is not worth it, the Chinese from Aliexpress now work without problems, at least for this purpose.
    5. USB Type C connector with board. This or such . A large fee is easier to fix in the case. Don't forget two 5.1 kΩ resistors.

      Why not to use the microcontroller connector or not to make a fixed wire? Of course, this can be done, which will lead to substantial savings, but mini-USB in Teensy or micro-USB in Pro Micro is flimsy, and the fixed cable is not always convenient and does not look so aesthetically pleasing, and here we are doing it like a conscience , children and grandchildren. If you still want to save money and are too lazy to mess around with the Type C pinout, then you can put a good old USB Type B, but you can’t accurately put it in the latest generation Model M, which had a non-removable cable, it will not work because of its size. You can make an external converter, but I don’t see the point, since most of the Model M’s museum value isn’t, it’s still not Space-cadetany However, if you regularly check Model M and other keyboards with PS / 2 interface, an additional external converter will be very useful.

    6. Office knife or scraper for ceramic tiles to cut plastic rivets.
    7. Dremel or other tool with a 2 mm drill. It is also desirable to use a grinding nozzle (with sandpaper or a roller cutter) for cutting off the remains of rivets from the plastic panel, since it is inconvenient to cut them off with a knife.
    8. Soldering iron.
    9. Spring clamps, four pieces. Can be replaced with large stationery clips. Greatly simplify the assembly procedure.
    10. Soil and paint on metal, if on the keyboard ever spilled liquid.


    My patient for this article is IBM Model M with part number 51G8572, released almost 25 years ago, on May 21, 1993. Removable twisted SDL – DIN cable, gray logo, inscriptions on Alt keys in green, right Control is marked Ctrl / Act. Inside the speaker is installed, that is, most likely, this keyboard was designed to work with the IBM RS / 6000 . The keyboard as a whole works, but on top of it is a thick layer of dirt, and the nampad keys are kind of wadded, do not work out clearly. It is worth a little shake to hear the detached heads of plastic rivets poured inside the case. The task: to clean up, make a bolt mod, make sure that all keys work, solder the adapter to USB, place the USB Type C connector.

    You should start by washing the keys and the cabinet. We unscrew the four screws , carefully lift and remove the upper part of the body - now it will be much more convenient to remove the keys. If the outside is just dirty, then there is simply horror: dust, hair, crumbs, paper clips, a colony of leaf cutter ants and rat corpses .

    The keys can be removed with a special tool (you can make it out of wire), but in Model M it will be much faster to just hook them up from the bottom, just not with a screwdriver, but with something soft, for example, a wooden chopstick. The gap is equipped with a wire stabilizer. Under the other long keys (cipher, enter, backspace and long pad) you will see fluoroplastic insert stabilizers. There is nothing to break in them, it is usually enough to wipe them with alcohol. We send the keys to the wash, separating the upper caps from the actual keys. In most cases, there is enough warm water with dishwashing liquid or detergent and a few hours to soak up the dirt. In severe cases, I use an ultrasonic bath, but sometimes even this does not help and the keys have to be scrubbed manually.

    Disconnect the controller. Unscrew the bolt from the plate holding the end of the harsh ground wire. Disconnect the small cable from the daughter board with LEDs.

    If you have the latest generation Model M or Unicomp, then the insides will look a little different - the small controller board along with the LEDs will be on the right; There will be no LEDs in the terminal keyboards, if desired, they can be added. Then you can gently lift the "sandwich" (assembly of a metal plate, membranes, gaskets and top plastic panel, then I will call it just a sandwich), pull out the controller and disconnect (neatly!) Loops. Before washing the case, it is worth protecting the “birth certificate” with a layer of masking tape, additionally gluing a regular one on top.

    We start disassembling a sandwich. Even if all the plastic rivets remained in place and all the keys work, there are still two reasons for disassembly and bolt mod . First, we make the keyboard conscientiously — for ourselves and for future generations (even if some telepathic neurointerface appears after 20 years and the keyboards start to die out, then retrocomputing fans will still remain). If these plastic gizmos miraculously did not fall off, then perhaps they didn’t use the keyboard and should prevent this attack. Going to the dark side and glue the places of the rivets torn off with epoxy is only if you are a shameless huckster and a barbarian. The epoxy will last for a while, but most likely will fall off .

    The effects of repairing the keyboard with epoxy. The author is Ripster. Source .

    Disassembling the "repaired" in this way the keyboard will be more difficult. For the same reason, dubious durability should not be used instead of screws screws. Secondly, the disassembly of the sandwich greatly simplifies cleaning the plastic panel; all sticking horror can be washed off with water from the tap and not picked out with cotton buds.

    If there are broken keys and / or rivets torn off, the choice is obvious - you need to cut it. Remember that after removing the keys from the "wells" now unprotected springs stick out, so you need to put the sandwich on the appropriate stand. Suitable shoe box. Cut the remaining rivets with a knife, scraper for the slab or other suitable tool. Observe safety precautions, plastic is strong enough, cut away from you. One or two rivets may be under the paper label. Before removing the plate, the edges of all rivets must be completely cut off, the plate must be removed without much effort. Pull the plastic panel by the edges or corners, and even more it is impossible to use a screwdriver - it will crack. Remove the plate and three membrane layers. If liquid is spilled on the keyboard, then you will immediately notice it by dark stains on the contacts of the membrane and rust on a metal plate. In some cases, rubbing with isopropyl will help, in case of strong oxidation, you will have to change the membrane. Under the membranes there will be a thin rubber mat, handle it carefully so as not to tear. Finally, at the very bottom there will be only a plastic panel with springs / hammers. They can simply gently shake out or transfer them to strips of masking tape, so you do not spend a lot of time to install. Springs should be carefully examined for rust. Remember the fragility of the plastic panel! It is provided with grooves, “fold lines,” but it can crack and cross when handled carelessly. in the case of strong oxidation will have to change the membrane. Under the membranes there will be a thin rubber mat, handle it carefully so as not to tear. Finally, at the very bottom there will be only a plastic panel with springs / hammers. They can simply gently shake out or transfer them to strips of masking tape, so you do not spend a lot of time to install. Springs should be carefully examined for rust. Remember the fragility of the plastic panel! It is provided with grooves, “fold lines,” but it can crack and cross when handled carelessly. in the case of strong oxidation will have to change the membrane. Under the membranes there will be a thin rubber mat, handle it carefully so as not to tear. Finally, at the very bottom there will be only a plastic panel with springs / hammers. They can simply gently shake out or transfer them to strips of masking tape, so you do not spend a lot of time to install. Springs should be carefully examined for rust. Remember the fragility of the plastic panel! It is provided with grooves, “fold lines,” but it can crack and cross when handled carelessly. so as not to spend a lot of time on installation. Springs should be carefully examined for rust. Remember the fragility of the plastic panel! It is provided with grooves, “fold lines,” but it can crack and cross when handled carelessly. so as not to spend a lot of time on installation. Springs should be carefully examined for rust. Remember the fragility of the plastic panel! It is provided with grooves, “fold lines,” but it can crack and cross when handled carelessly.

    In my instance, a crack in the plastic panel was formed from the left end and along the “fold line”. At first, a pair of rivets in the area of ​​the nampad came off and one or two keys became “wadded.” The user began to press the keys harder, a few more rivets fell off, and so on, until you had to hammer the keyboard down to get the keys to work. With bolt mod, such a crack is not dangerous, but the butt should be sealed. The studs were still on the panel. They can be whipped off completely, leaving a few pieces for easy laying of the membrane, but you need to at least cut off the thickening from the top.

    Install the metal plate back, clamp it with spring clamps. Before drilling it is advisable to mark the holes. In the first generation Model M, for vertical keys, wire stabilizers were used, which could be hindered by the heads of the respective screws; you will have to look for flat-head screws.

    Wire stabilizer vertical 2U keys in the early IBM Model M. Written by Sandy (Deskthority wiki, publick domain). Source .

    I used a diamond cone nozzle, but you can do it with a soldering iron with a thin sting. You do not need to drill the bottom row - this edge of the panel will press against the projections on the bottom of the case. After stripping and drilling will be a pile of electrified plastic shavings and sawdust. Take the time to rinse well and dry the panel (remember that you can not shake it!).

    Putting a sandwich back. The panel on the stand, inserts stabilizers, hammers (make sure everything is flat), do not forget that not all the seats are installed hammers. Then there are a rug, membranes (they cannot be put on the wrong side, the main thing is to lay exactly) and a plate on top.

    We clamp along the edges with four clamps or stationery clips, overturn, insert screws, twist the nuts. It is not necessary to firmly tighten, the screws should protrude 1-2 threads. Put back the keys and check their work. If something doesn’t click as it should, then you should try to slightly loosen the screws around the problem key.

    With the mechanics finished, let's do electronics. The SDL connector on the controller will interfere, you need to get rid of it. It is difficult to unsolder it, without peeling off the tracks, at least for me, so I just gently broke the plastic case of the connector with a nipper and dropped out the contacts one by one. The pin of the PS / 2 interface on the openings looks like this:

    As a converter, I used Teensy 2.0 (Chinese clone) with Soarer's converter firmware . A kind person under the nickname Soarer placed five years ago on Geekhack and Deskthority firmware, allowing you to connect XT, AT, PS / 2 and IBM terminal keyboards via USB with the following functionality:

    • Key mapping, layers and macros.
    • Upgradeable configuration. Unlike TMK / QMK, where the configuration is part of the firmware, and with any change you have to compile the firmware and rewrite the controller, SC allows you to load a small configuration file into the EEPROM.
    • NKRO support (if supported by the original keyboard).
    • Five keys additionally connected to the microcontroller - a pedal or keys added when modifying the keyboard.
    • Connecting LEDs (NumLock, CapsLock, ScrollLock). Useful for IBM terminal keyboard and early Model M for IBM PC XT, where there are no LEDs.

    Unfortunately, Soarer disappeared from the keyboard forums in 2014, nothing is known about his fate, he did not leave the source codes, but there were attempts to disassemble. There is about the same, except for updating the configuration of the TMK project from the no less legendary Hasu.

    So, fill in Soarer_at2usb_v1.12_atmega32u4.hex in Teensy 2.0 with the help of Teensy loader (as I already mentioned, you can use Arduino Pro Micro, but there appears fuss with drivers and utilities) and solder it to the keyboard controller: Data to PD0, Clock to PD1 and the earth is powered. You can immediately connect to the computer and check all the keys through the Switch Hitter .

    It remains only to arrange everything beautifully and place the keyboard into the case. I chose a strong and modern USB Type C, but, as mentioned above, you can save money by replacing it with Type B or making the cable non-removable. The pinout of the Type C connector looks like this:

    For our purposes, we need power (A4, B9, B4, A9), ground (A1, A12, B1, B12 and connector body), a pair for data transmission - D + (A6, B6) and D− (A7, B7). CC1 and CC2 must be connected to ground through resistors with a resistance of 5.1 kΩ. We connect to the stub of the USB cable bundled with Teensy: black - ground, red - power, green - D +, white - D−. A little plastic, superglue, electrical tape - and the connector is ready. Fix the tie and the keyboard is ready.

    We use the functionality of the converter. I based it on layer, a simple configuration that assigns CapsLock as a modifier for FN1 and FN1 + I / J / K / L as arrows. You can add a few more keys (PageUp / PageDown next to these additional keys, Win-key, CapsLock and several multimedia keys on F5 – F11):

    One has only to say scwr конфигурация.sc - it will be compiled into a binary one and poured into the keyboard.

    That's all, successful drilling and all the clack. Many thanks to Soarer, Hasu and Ripster keyboard geeks for their invaluable contribution to keyboard science.