Typing mathematics is hard, much harder than typing a plain text. One reason is the math notation: because math equations have much more complex structure and use many more symbols than plain-text lines. Another reason is the keyboard: because keyboards are engineered for plain-text entry, not for math entry… Alternative computer-entry techniques, like handwriting recognition or even speech recognition, will also bump into major problems with mathematics. When one considers the future of math entry, the following facts should be kept in mind:

- Keyboards will never change to accommodate for math typing needs. There are just too few people in this world that are in need to type lots of math.
- Handwriting recognition is going to advance and likely, one day, it will be able to recognize all the symbols needed. The main problem with this future handwriting recognition technology is that it has limited potential to speed up math writing or to make it any easier compared to today’s pencil-and-paper technology.
- Speech recognition is in deep trouble because we don’t even know how to pronounce more complex math equations. Speech recognition alone is also very useless when you want to make a quick illustrative sketch (a hand-drawing) of a math problem.

As a result, I am guessing that in the observable future most people will use handwriting recognition to enter few math lines now and then. Those that will need to enter tons of mathematics might choose to learn and use ten-fingers-and-a-keyboard method – supposing that keyboards are still going to be around. At this moment the keyboard seems irreplaceable in the working environment, but in future some technologies might replace it. Handwriting is too slow (unless we all learn stenography). Speech recognition might become a primary data-entry interface in future. We will invent new words that will help us with editing and stuff where today’s vocabulary seems cumbersome. Speech recognition might also be accompanied with the eye-tracking technology so that computer will know what part of our document we are referring to… If we allow ourselves even more speculations, we may come up with some direct-to-brain interfaces and so on (but then the question is how much time we will have in order to invent these new technologies before sentient computers take over the further progress of our world).

Here and now, the Math-o-mir uses keyboard. I wanted to clearly present core ideas of how math typing is implemented in the Math-o-mir software. The following table shows how variables and symbols are typed.

As you can see, the software uses double-strokes to create Greek symbols. This idea, I feel, is not always a perfect solution. I would prefer to have an alternative way to convert a Latin symbol into a Greek symbol – for example typing ‘x’ and then hitting some other key to make the conversion. The problem is that I have no free keys left.

As you can also see, there are two ways to generate uppercase symbols (that is, symbols that are generated with the shift key). The first method is, of course, to use the Shift key. The second method is to press-and-hold a key for about 0.5 seconds. The second method is pretty much useless in the above simple examples, but it becomes useful when entering exponents or indices (indexes).

To enter an exponent you generally use the hat character ‘^’ (alternatively you can use the double-quotation mark character that is easier to type on some keyboards). However, many times it is quicker to divert characters into exponents by using the Alt key. This is shown in the table below.

Holding down the Alt key while you are typing places characters into exponent. Now it makes much more sense to use the press-and-hold method to place uppercase symbols into exponents because this way you avoid the need to hold down three keys simultaneously (shift+alt+some_key).

The Alt key was chosen because on many keyboard you can hold it with your thumb finger. The problem is that the Alt key is used for menu access in Windows. Therefore using Alt+F, Alt+E and Alt+V combinations will not work unless you configure your Math-o-mir to ignore these menu access shortcuts. I can only hope that in future Microsoft will not reserve the Alt key for some additional tasks.

To enter an index, you generally use the underline ‘_’ key. Sure, there is also a quicker way to enter simple indices: hold down the Spacebar key while you are typing. This is completely analog to the exponent typing, as it can be seen in the table below.

The Spacebar is also chosen because it can be held down with the thumb finger so that you can type with your other 9 fingers. The only possible problem with the spacebar is that it is not common to use Spacebar+some_key combinations. I am even afraid that there might be some keyboards around that might not allow such combinations.

Keyboard usage innovations mentioned above are not nearly enough to type mathematics. In Math-o-mir there are many more. Few of them are not obvious, but I think are useful enough so that every serious user should learn them.

- I already said that the ‘hat’ and the underline characters are used to generate exponents and indices, respectively. This is not an innovation. However, on most keyboards the Shift (or even the AltGr) must be used to generate these characters. Especially the hat key is problematic on some keyboards where it acts as a dead key – that is why in Math-o-mir you can also use the double-quotation mark key instead of the hat key.
- To generate fraction lines in Math-o-mir you need to stroke the slash key twice. This is neither very quick nor it is an intuitive way to type simple fractions (like ½). To quickly type simple fractions I am therefore recommending the hash key ‘#’ (or the grave accent key). The difference is that in the first case you start the fraction by generating the fraction line (by double-stroking the slash key), while in the second case you start by typing the numerator and then you put the fraction line under it (by stroking the hash key). I urge users to learn both these methods. Remember that even when you are using pencil-and-paper, you will typically start a complex fraction by drawing a fraction line first, while you will start with the numerator if you are writing down a simple fraction.
- Multi-letter variables are, in my opinion, the future of math notation on computers. In Math-o-mir there are two ways to enter the multi-letter variables. I recommend that you choose one of them and stick to it. The first method is displayed in the table above and involves the apostrophe key: start the multi-letter variable with the apostrophe key and end it with the spacebar key or any math operator key. But if you type multi letter variables very often then maybe the second method would be a better choice for you: select the ‘Options->Keyboard->General Variable Mode’ option and type the multi-letter variables without the apostrophe key.
- Finally, there is the dot (period) key conversion method. The dot key will convert a variable (or variables) that you just typed into a function. I am very proud on this innovation, but several questions remain. First, how many users are interested in making distinction between functions and variables? In math, when you see an expression like ‘y(x+1)’ you cannot be sure if this is function ‘y’ that has ‘x+1’ into its argument, or if this is just en expression equal to ‘yx+y’. That is why in Math-o-mir there is a clear distinction between functions and variables. However, for users that are only interested in equation look, the distinction between functions and variables is just an annoyance. Second, would then it be better to use the handy dot conversion method to generate Greek symbols or measurement units instead? Functions can be generated using the backslash key anyway.

Here is an example how to type an equation (note that there are many ways to type the same equation – for example instead using the ‘Enter =’ one can stroke the ‘=’ key twice)

There is one more keystroking that needs to be discussed – the Alt+Spacebar keystroke. This keystroke toggles between math-typing and plain-text-typing mode. Some users use it very often… I would prefer to have some handier, single-key method to toggle between typing modes. The only obvious candidate key for such function is the CapsLock key. The CapsLock key is unfortunately still used by some people, especially in some countries. Sometimes it is used to differentiate between, say, Cyrillic and Latin character set… In fact, even the Alt+Spacebar combination is used under Linux for system menu access (I recommend Linux users to use Spacebar+Alt to toggle typing modes in Math-o-mir). I also implemented double-stroke-comma method to toggle the typing mode because the comma key is always easy to type on all keyboard layouts. But the double-stroke-comma method also has its drawbacks and I wonder if the double-stroke-comma could be put into a better use.

What about the Ctrl key? The Ctrl key is dedicated to user-defined accelerator shortcuts. The only exceptions are Ctrl+X (cut), Ctrl+C (copy), Ctrl+V (paste), Ctrl+Z (undo), Ctrl+S (save). Oddly, the Ctrl+X can also be used to generate the multiplying cross sign.

At the end, I want to discuss variable formatting and decorations. This includes font type, bold and italic settings for a variable as well as decorations above (arrow, dash, dot, double dot, hat…). There are two ways to control variable formatting in Math-o-mir:

- You can choose font and decorations in advance (in Math-o-mir you can even select font and decorations for every letter key separately). You can prepare several different font -and-decoration configurations and quickly choose between them by using user-defined Ctrl accelerators… However choosing font and decoration in advance is not very handy if you need to type just one letter formatted in different style. Therefore it is also important that…
- You can modify font and decorations after you already typed the variable… For example Alt+comma and Alt+period combinations can be used to add decorations (vector arrow, dash, dot, double dot) over variables that you just entered. More generally you can select the variable you just entered by using Shift+left_arrow key and then modify it by typing ‘b’ (bold), ‘i’ (italic), ‘u’ (underline), ‘s’ (strikeout), ‘r’ (red), ‘g’ (green). However, using Shift+left_arrow is not at all that handy and I desperately need one single easy-to-type key that will select the last entered variable. Also I could use some key combinations to quickly make a variable bold or italic.

One thought that comes to mind is that making the keyboard shortcuts customizable would allow people to make MOM suit the kind of math they type regularly. Overall, there are many cases where you could expose settings (like the long-hold timeout, currently at 0.5 seconds) that would allow users to find what helps them type. Sure, you still have to have good defaults, but this would get around the CAPS LOCK issue (I use it a lot at work, not much at home) by allowing people who use CAPS a lot to define their own key.

I agree. Somewhat increased customizability would be beneficial – the CapsLock key is a good example. I think I will try to implement the CapsLock as the Math/Text toggle key (but not by default).

However, I think that there are limits on how customizable a software should be. Especially if an user doesn’t want to know the software in details. For example I constantly find myself loosing time with software where I accidentally move a dockable toolbar and then I don’t know how to move it back (and I don’t even want to learn how to do this because I only need to use that software for 5 minutes). That is why I opted for non-dockable toolbox/toolbar in MoM… An other thing is that a new user will only use a software for 3-4 minutes to check if he/she can use it ‘intuitively’, and that is another reason why default settings are so much important (as you said)… Anyway, I wanted to explain why I am somewhat slow to adopt costomizability in MoM (it is also more difficult to write documentation then 😉 )

Agreed: customizability makes things much more complex. But that is where carefully chosen defaults come in. Honestly, I would only customize a few keys. I learned which those are by using the defaults many times. Labor over and choose your defaults, but let others customize based on the type of math they write most frequently.

The documentation does not have to change, just include a note saying all keys are shown using the defaults!

Especially for a keyboard-centric program, I think having customizable keys (timings, double-tapping, etc) would be quite handy. It also would make you think about what math-writing-functions are important, rather than which keys (ahhhh, abstraction again… actually, this could be the biggest benefit of making the keys customizable).