## Sunday, February 24, 2019

### TeXbrd: The custom mechanical keyboard with $\LaTeX$ bindings

So I had this ridiculous idea about 6mo ago. I use $\LaTeX$ all the time in my homeworks, research, and writing in general. I even use it for documentation when I am doing work for different companies. Overall, it is an excellent programmatic, scripted documentation language that seems to have infinite degrees of freedom. I always felt that I could do so much more if I had an edge on speed while writing mathematics. The following takes roughly 40 seconds for me to write out (counting sublime auto-fill features):

$$J = \sum_{i=0}^{N-1} x_i^TQx_i + u_i^TRu_i$$

I know that you can just add bindings to an existing keyboard. I know there are simpler solutions to make writing $\LaTeX$ quicker. But I like keyboards, designing PCBs, writing firmware, and ridiculous solutions to simple problems. So I built a keyboard. I dub thee TeXbrd.

For some reason I decided to use a Teensy 3.2 early on, only because I knew it could function as an HID keyboard and had all the support for it. I should have gone with the pro mini with QMK firmware that is already extensible.

I started off (MkI) with a 60% style keyboard style as you see in the foreground here:
I quickly realized that I did not want to be stuck in layer-hell by burying the navigation cluster. Additionally, I would be using double modifiers for all of the $\LaTeX$. There would be a key for Greek AND math. The latter is the part that would be impossible to remember.

Around this time, I also got my vintage IBM SKCC Alps cream pingmaster keyboad which made my fall in love with linear switches and battlestations (keyboards with tons of keys).

MkI also had Cherry MX blues which are a flaming disaster of a keyswitch. I also wanted this to function in an office environment.
SO I moved to Kailh box reds, which are superior in their smooth linear quality as well as being quiet enough so that my office mates don't throttle me (in fact I am making one for a fellow lab-mate).

You can see MkI in the background with my IBM pingmaster in the foreground.

I enjoy the ortholinear look of the number keys and function keys. I also chose to go for a 2U sized escape key, as I find myself using ESC very often. I made sure that all of the keys lined up such that I could but a delete key above backspace.
Below you can see the board layout! The teensy jutting off the side seemed cool, and I was going to make an additional add-on board that clips in via TRRS jack. But too much work; plus higher BOM and PCB cost.

So I ordered the standard 5pcs of this from JLCPCB (totally recommend, unbelievably cheap). I made one with cherry blues, died a little on the inside, and then proceeded to design MkII. This time, I added the extra keys for dedicated math bindings (so tired of writing \frac{}{} +  3x left key hundreds of times). Here is the layout for MKII:

The layout got a little trickier, but still all 2-layer. I also learned some lessons on rollover diode placement with respect to the stabilizers. I made sure to bring the bottom of the PCB up as high as I could, and you can see the spacebar stabs are truncated.

I fabricated these PCBs in white color, and ordered another 5pcs with the full expectation to build all of them (currently doing as I get free time). I wanted a proper case, unlike the layer of neoprene I put under the MkI PCB. I also enjoy having a slightly angled board for my wrists, and elevated to accommodate a future rest if I like. I designed the case to be printed on my Wanhao I3 printer:

I was inspired by an online design on kbdfans of a 5-degree case. So I did my best to keep it cool and polygonal. After a couple printed revisions, I got the design down and made some pretty sweet prototypes.  Oh and I also spent a ton of time laser cutting and debugging a design for a 1.5mm acrylic backplate for all of the switches to lay into:

They turned out excellently..... They are honestly a joy to type on; and I almost want to just make a wall of them. They look so good!!!!!!

If you want one, I may start selling them for ~\$155 each. Contact information: PSL58@cornell.edu