A Mathematical Keyboard Layout

I’ve often found myself typing basic mathematical symbols into Twitter comments, such as subscripts, exponents, infinity, the dot product, the cross product, and especially the minus sign, because I can’t stand using a hyphen to mean negative or subtract. I had enabled hex Unicode input on the numeric keypad, which requires a registry change, and I would type in codes that I had memorized, like 2212 for minus, or looked up as needed.

Recently, I learned that Microsoft has made a keyboard layout tool available for the past 10 years, and it’s possible to make keys type whatever characters you want. More importantly, you can re-purpose the AltGr key, which is used to type things like accented letters on non-US keyboards, so that it functions as a modifier key that changes the meaning of every other non-modifier key on the keyboard. (On US keyboards, the AltGr key is just the Right Alt key, and it can be interpreted separately from the Left Alt key.) Furthermore, the AltGr key can be combined with Shift so that you can assign two characters to each key. So, of course, I thought it would be interesting to turn that into a Math modifier that turns all the other keys into mathematical symbols.

After a few iterations through the Keyboard Layout Creator, I zeroed in on a design that I liked. A couple people on Twitter pointed out to me that WASD Keyboards actually makes custom keyboards with whatever you want printed on the keys! So I ordered one, and it turned out perfectly:

Now I’ve got a Math key and a whole bunch of mathematical symbols that I use a lot right at my fingertips. Here’s a brief description of what I assigned to each key, and in many cases, some reasons why:

  • All the letter keys except J, O, U, and V produce lowercase Greek letters. (Theta was assigned to Q because it’s common, and that’s what I’m used to in programs like MathType.) O and U were left out because it’s extremely rare to see omicron or upsilon used in technical writing. J and V were left out because the Greek alphabet only has 24 letters, and we have two extras.
  • With the Shift key in, the letter keys D, F, G, L, P, Q, S, W, X, and Y type uppercase Greek letters. The letters left out are those that look exactly like the Roman letters, and thus would never be used in technical writing.
  • With the Shift key in, the N, Z, T, R, C, and H keys produce double-struck letters for the sets of natural numbers, integers, rationals (too bad Q was taken), reals, complex numbers, and quaternions.
  • Shift-A types an aleph. This is used for transfinite cardinal numbers, which I don’t talk about often these days, but it seemed appropriate to put A from all the alphabets on the same key.
  • Shift-B types a partial derivative symbol, and Shift-M types an approximately equal symbol. There’s really no connection with those particular letters, but they were open, and I chose those symbols for them.
  • For the remaining capitals, I chose to put “empty set” on E, “in a set” on I, “not in a set” (“out of a set”) on O, and a variant of lowercase phi on K. Instead of a lowercase omicron, which also is never used, I put the function composition symbol “of”.
  • Instead of upsilon, the U key has subset relations. The unused J key has union and intersection symbols, and the unused V key has logical AND and OR symbols, which are also used for the wedge product and antiwedge product.
  • All of the number keys type subscript and superscript numbers, depending on whether Shift is held in. The grave/tilde key has superscript plus and minus. (Subscript plus and minus are left out.)
  • Naturally, less than or equal and greater than or equal are assigned to the existing less than and greater than keys. Without Shift held in, these keys type the symbols for cross product and dot product.
  • The minus sign is on the hyphen key. Holding in Shift gives you a horizontal middle ellipsis.
  • The symbols for not equals and plus/minus naturally fit on the key for equals and plus.
  • The quote key turns into prime and double prime.
  • Angled brackets go on the brackets keys, and holding in Shift gives you left and right arrows.
  • The colon key has a bullet and the degrees symbol.
  • The slash key has a radical and the infinity symbol.
  • Finally, the backslash key has the del operator (gradient) and a double vertical bar (magnitude).

For anyone who’d like to make their own similar keyboard, I have uploaded a ZIP file at the following location containing the keyboard layout and the Illustrator file that I sent to WASD Keyboards to get my keys printed: http://terathon.com/math_keyboard.zip