The Mathboard

A side keyboard for scientists and engineers

Public Chat
Similar projects worth following
The Mathboard is a side keyboard that simplifies typing of mathematical equations.

It works both as plaintext Unicode, and in the Microsoft Office equation editor. Support for LaTeX is currently in development, and support for Open Office is planned.

The Mathboard gives you effortless access to the Greek alphabet and more than 80 of the most commonly used mathematical operators. Gone are the days of looking up Unicode symbols on Google or clicking around in the Office equation editor.

Github project repository :

The ultimate goal of the Mathboard is to make my life easier. I often write equations, and I have long been frustrated by the amount of time spent looking up special Unicode symbols on Google, clicking around in the Equations Editor in Word and Powerpoint, and looking up LaTeX math codes. I feel like I would save time if I had a keyboard that could insert the correct symbols, operators, and LaTeX codes automatically.

The Mathboard aims to do all this. It is a 4x4 macro keyboard from 1UP Keyboards with custom firmware.

End goals

I want to eventually come up with a design that works seamlessly on Windows, Mac, and Linux, and which can switch between plaintext mode, LaTeX mode, and Math ML mode. The current design uses an off-the-shelf macro pad because this allows for rapid development. As I refine the behaviour of the keyboard, I can begin considering changing key layouts and overall design. I will be making it all open source, and hope to create something that is actually useful for many people.

  • 1 × Sweet 16 Macro Pad PCB Macro pad PCB from 1UP keyboards
  • 1 × Pro Micro mcu Microcontroller, sold by 1UP keyboards with the macro pad PCB
  • 16 × Diodes Sold by 1UP keyboards with the macro pad PCB
  • 1 × Reset switch Sold by 1UP keyboards with the macro pad PCB
  • 16 × Switches, 5-pin PCB mounted

View all 6 components

  • Keycaps!

    Magne Lauritzen09/25/2022 at 19:22 1 comment

    I received the custom keycaps for the Mathboard today. They were made using a UV printer by a German maker I met at Nantes Maker Campus 2022. He has been kind enough to help me out with getting my design onto the keycaps.

    The result looks pretty good!

    If you have a UV printer and want to make these keycaps yourself, the .svg files are available at the Mathboard Github repository:

  • Going open source

    Magne Lauritzen08/22/2022 at 08:54 0 comments

    In the spirit of open source, I have set up a Github repository for the Mathboard. Here you will find the source code, prebuilt firmware binaries, and keycap decals.

    Hope it may be useful to someone!

  • Deciding on the layout

    Magne Lauritzen08/01/2022 at 19:24 0 comments

    The apparently simple task of deciding which symbols go where on the math keyboard has been more challenging than I had anticipated.

    The main problem is lack of real-estate. Consider that the keyboard only has 16 buttons, while Wikipedia lists hundreds of mathematical Unicode symbols:

    Clearly, it will not be possible to fit every mathematical symbol on the math keyboard. We have two ways of approaching this problem:

    1. Fit more than one symbol on each button
    2. Focus on the most-used symbols

    The second solution is a bit more tricky because it requires us to make a decision about which symbols common enough to be granted a spot on the math keyboard. 

    Fitting several symbols per button

    This approach is easy. Everyone is already used to the concept of keyboard buttons having more than one symbol. Just look at the number row, for example. They all have numbers and symbols on each button.

    For the mathematical keyboard, I decided to fit 6 symbols per button. This may sound like it will get confusing very quickly, but I think it'll work fine. I take advtantage of the fact that the keycaps have a sloped front so one can see symbols printed on the front face. 

    A single button
    A single keycap showing the locations of the 6 symbols that it can fit.

    The button is separated into two columns of symbols: A blue A-column, and a cyan B-column. f you simply press the button, you get a. If you hold Shift while pressing the button, you get A. If you hold Alt while pressing the button, you get α, the front-facing symbol. The same is true for the cyan B-coloumn, which is accessed by holding down Opt. So, Opt+button gives b. Opt+Shift+button gives B. And Opt+Alt+button gives β.

    Therefore, by giving up only 3 buttons for Shift, Alt, and Opt, we can fit 6 times as many symbols on the remaining 13 buttons. And by a lucky coincidence we can exactly fit the 26 greek letters by placing two on each button! Perfect.

    We can push this approach even further by allowing certain symbols to have multiple different versions accessible by double-tapping, triple-tapping, or even quadruble-tapping the same button. This is useful for certain symbols like roots (√, ∛, ∜) and integrals (∫, ∬, ∭). It can also be used to negate symbols (∈∉, ∃∄), or to access uppercase-versions of letters (δΔ, θΘ, σΣ).

    Selecting the most commonly used symbols

    This part has been difficult. The goal of the math keyboard is to be as useful as possible to as many people as possible, which means that the symbols that go on the keyboard must be the most commonly used ones. But what is a "common" symbol? I decided to refer to Wikipedia on this matter, with their excellent Glossary of Mathematical Symbols.

    From this article and based on my own experience, I decided on the following groups of symbols (with a few examples in paranthesis):

    • Greek letters (α, β, γ)
    • Comparisons and equivalence (≠, ≈, ≪)
    • Algebra and calculus (∑, ∫, √)
    • Set theory (⋂, ∈, ⊂)
    • Logic (⇔, ∃, ¬)
    • Diacritics and supscripts (◌̂, ◌̃, ◌⁰)
    • Various others (⋅, ±, ∞)

    These groups should hopefully cover most of what a regular mathematician, phycisist, or engineer will need. It is of course likely that many users will miss a few special symbols that they need often, but this is unavoidable.

    The layout

    I eventually decided on the following layout:

    Each key is separated into a light 2x2 top face and a dark 2x1 front face. Each key also has a green main section and blue Alt section.

    The symbols with a red triangle in corner has additional symbols accessible by multi-tapping the key. Double-tapping greek letters gives their uppercase versions if they differ from the Latin alphabet. So double-tapping σ will give you Σ, but double tapping α does nothing since that would...

    Read more »

  • Motivation

    Magne Lauritzen07/05/2022 at 10:18 0 comments

    This log entry relates to the motivation behind creating the mathematical keyboard.

    When you want to type mathematical equations on a computer, you have a set of options.

    • Type it in LaTeX
    • Type it in the Microsoft Office or Apache Open Office equations editor
    • Type it in plaintext for simple equations like α ≤ β ± 2 °C

    The TL;DR is:

    • LaTeX is really flexible but requires practice and memorization of codes
    • Equation editors are flexible but requires a lot of clicking around in menus
    • Plaintext requires copypasting from a source for each symbol 

    In each case, the mathematical keyboard will save the user time by reducing the amount of memorization, clicking, or copypasting, by simply having the codes, symbols, and operators available with a single keystroke.

    Typing in LaTeX

    Of the three, typing in LaTeX is the most flexible and has long been the standard in many scientific fields like mathematics and physics. The downside to LaTeX is that it requires you to memorize LaTeX codes. Often these codes are logical, like `\alpha` to get α, or `\plusminus` to get ±. Other times they can be a bit more obscure, like `\ngtr` for ≯ . And when you get into limits, sup/subscripts, and advanced formatting it quickly gets messy. Let's look at what's needed to type the Fourier Transform definition:

    The LaTeX code for this equation looks as follows:

    \hat{f}(\xi) = \int_{-\infty}^{\infty} f(x)\ e^{-i 2\pi \xi x}\,dx,\quad \forall\ \xi \in \mathbb R

     If you have never written equations in LaTeX this can seem daunting. Many new users of LaTeX spend a good chunk of their time looking up the codes for the symbols they need, and how to make sure they appear in the way they want them to. You'll usually see undergraduate and graduate students alike with LaTeX cheat sheets covering the walls of their study area. A keyboard that automatically writes the correct  codes for commonly used symbols and operators might save them some time.

    Typing in an equations editor

    Typing in the Microsoft Office or Apache Open Office equations editor has the benefit of much of the same flexibility as LaTeX, but with the need for copious amount of clicking around in menus. Typing the Fourier Transform definition in the Word equations editor took me 46 mouse clicks in 5 different menus, and that's the best case after some practice. All this time spent clicking around and looking for the correct symbols in different menus could be reduced by the mathematical keyboard.

    Typing in plaintext

    The Unicode standard defines a large set of mathematical symbols, and it is therefore possible to type simple equations alongside the regular text. This is very useful when you just want to, for example, remind the reader that σ = ±2.2 or that ε ∈ ℂ . You can even define slightly more advanced equations, but there is a limit due to the lack of Unicode support for superscript, subscript, and much more. But if we try to write the Fourier Transform in plaintext we get:

    f̂(ξ) = ∫_(-∞)^∞ f(x)e^(-i2πξx) dx, ∀ ξ∈R 

     Doesn't look too great, but it works. The downside to typing in plaintext is that almost none of the symbols are available to you on a typical keyboard layout. When did you last see a keyboard with an integral sign on it? You will either need to copypaste every symbol from a source like Wikipedia, or memorize their 4-character Unicodes. For example, typing in Alt+222B gives you ∫. But this also requires you have a keyboard with a numpad, which isn't that common anymore. A mathematical keyboard would be hugely useful when you want to type plaintext equations.

View all 4 project logs

Enjoy this project?



stevenaughtonnsx11 wrote 10/24/2022 at 13:14 point

Without mathematics, it would be impossible for mankind to survive. Not everyone is interested, but still. I recently solved forms of linear equations, used for this. Sometimes it’s hard to figure it out on your own, but I don’t want to go to a tutor. Not everything in life can be known, so I often use such methods.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates