Create TeX/Math/APL Keyboard Layout
This page shows you how to create a keyboard layout for inputting math symbols. for {Windows, Mac OS X, Linux}.
For example, you can create APL (programming language) keyboard layout, or for LaTeX/XeTeX, or simply as a system to type math symbols in plain text.
APL Keyboard Layout

Unicode Font
You'll need font to display math symbols.
The DejaVu font has all APL symbols and vast majority of math symbols.
Download DejaVu fonts at https://dejavu-fonts.github.io/
For other choices, see: Best Unicode Fonts for Programer. For emoji, see Download Free Unicode Fonts.
Unicode Characters
You'll need to copy paste unicode characters. Here's references.
- Unicode APL Symbols
- Unicode Math Symbols ∑ ∫ π² ∞
- Unicode Arrows →
- Unicode: Brackets, Quotes «»「」【】《》
- Unicode: Greek Alphabet α β γ
Create Your Own Layout
Mac
For Mac OS X, see: macOS: Create Custom Keyboard Layout
Windows
[Microsoft Keyboard Layout Creator By Microsoft. Search the web. The links changes often. ]
Using Emacs
If you are using emacs, you don't need any of the OS layout.
emacs provides you the most flexibility. There are many ways to setup to insert a particular character.
Insert by Keyboard Shortcut
Put the following in your emacs init.
;; example of systematic keys to insert math symbols (global-set-key (kbd "<f9> <right>") "→") (global-set-key (kbd "<f9> a") "α") (global-set-key (kbd "<f9> b") "β") (global-set-key (kbd "<f9> t") "θ")
The F9 key can be any other key.
This method of input is:
- fastest for inputing symbols. Direct key press.
- good if you have less than 50 symbols.
- not good if you have hundreds of symbols, because it's hard to memorize keys.
Insert by Abbrev
You can insert Unicode by abbrev. For example, typing alpha
follow by space, becomes α
.
see Emacs: Abbrev Mode Tutorial
This method is:
- good for hundreds of symbols, because this method lets you type a short name of the symbol, and is easy to remember.
- slower than a keyboard shortcut.
Insert by Short Code and Activation Key
Another way is to type a short code, from 1 to 4 letters, then press a hotkey to change it to a math symbol.
see Emacs: Xah Math Input Mode
It is designed for working with typing math in general, not specifically for APL.
You can add your own abbrevs for APL symbols.
back to Keyboard Shortcut/Layout Tutorial
Keyboard Shortcut Design
- How Many Shortcuts Are There
- Emacs vs vim, Keybinding Efficiency
- vim HJKL vs IJKL
- Design of vim Mode Activation Key
- History of emacs/vi Keys
-
Ban Key Combos - Ban Shift Key
- Function Key vs Key Chord
- Fast-repeat vs Non-fast-repeat Keys
- Modifier Keys Usage Frequency
-
Keyboard Shortcut vs Launch Buttons - Best Way to Insert Parenthesis/Brackets
Math Input Design-
Create APL/Math Layout - Linux Mac Windows, Which is Best for Keybinding?
- patreon me $5
- amazon egift card to xah@xahlee.org , $20 is nice.
- paypal to xah@xahlee.org , $20 is nice.
- bitcoin me 19dfoa3Q7oehm9MwCULQzBG8vqfCaeMazH
If you have a question, put $5 at patreon and message me.