Typing APL
About the Glyphs
APL is distinguished by its use of symbols to represent primitive functions and operators. You will quickly learn to type these glyphs, using a method to suit your preference.
Language Bar
Video: Using the Language Bar
The Language Bar makes it easy to access APL symbols without using the keyboard. Hover the mouse pointer over a symbol to see its usage. Click on a glyph to insert it in the Session.
APL Keyboard
APL can be entered using a software layer on top of your normal keyboard input. This is comparable to how you can type many languages which do not use the Latin alphabet, or which use accents. There are two main types of APL keyboard input: a prefix key method and a shifting key method.
With a prefix key, a particular key (often backtick ` on English layouts) is pressed and produces no output. The subsequent key press will produce a glyph. For example, ` followed by b produces ⊥ and `, Shift + 4 produces ⍋
.
A shifting key is a key which, while held, enables glyph input when pressing other keys. For example, if Ctrl is your shifting key then holding Ctrl while typing b produces ⊥ and Ctrl + Shift + 4 produces ⍋
.
The default Dyalog input method on Microsoft Windows supports both shifting key input using Ctrl and a customisable prefix key input.
On other platforms, the prefix method is the default.
TryAPL also includes the Tab input method, but it is not well supported outside of TryAPL.
Typing Glyphs Outside Dyalog
Microsoft Windows
Install the Dyalog Unicode IME for 64-bit Windows.
Troubleshooting
macOS
Download a .zip file (or see the forum for custom or other layouts):
- Unzip the contents into/Library/Keyboard Layouts.
- Go to System Settings → Keyboard → Text Input → Input Sources → Edit
- Enable Show Input menu in menu bar
- Click + in the bottom left corner
- Go to Others, select the Dyalog Alt layout and click Add
- Click Done
- Select Dyalog Alt layout from the Input menu
This enables Option ⌥ as an APL shifting key.
Linux
Most Linux distributions with X11 and Wayland have Dyalog APL keyboard support included with the distribution. Enabling the keyboard depends on the desktop environment, see APL Wiki for instructions.
Keyboard layout diagrams
Keyboard layouts can vary between operating systems, locales (country and language-specific layouts) and operating systems.
Dyalog APL’s standard UK English layout is as follows:
┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬─────────┐ │¬ ⌺ │! ⌶ │" ⍫ │£ ⍒ │$ ⍋ │% ⌽ │^ ⍉ │& ⊖ │* ⍟ │( ⍱ │) ⍲ │_ ! │+ ⌹ │Backspace│ │` ⋄ │1 ¨ │2 ¯ │3 < │4 ≤ │5 = │6 ≥ │7 > │8 ≠ │9 ∨ │0 ∧ │- × │= ÷ │ │ ├────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬──────┤ │Tab │Q │W │E ⍷ │R │T ⍨ │Y │U │I ⍸ │O ⍥ │P ⍣ │{ ⍞ │} ⍬ │Enter │ │ │q ? │w ⍵ │e ∊ │r ⍴ │t ~ │y ↑ │u ↓ │i ⍳ │o ○ │p * │[ ← │] → │ │ ├───────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┐ │ │Caps │A │S │D │F ⍛ │G │H │J ⍤ │K ⌸ │L ⌷ │: ≡ │@ ≢ │~ │ │ │Lock │a ⍺ │s ⌈ │d ⌊ │f _ │g ∇ │h ∆ │j ∘ │k ' │l ⎕ │; ⍎ │' ⍕ │# │ │ ├──────┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴────┴─────┤ │Shift │| ⊣ │Z ⊆ │X │C │V │B │N │M │< ⍪ │> ⍙ │? ⍠ │Shift │ │ │\ ⊢ │z ⊂ │x ⊃ │c ∩ │v ∪ │b ⊥ │n ⊤ │m | │, ⍝ │. ⍀ │/ ⌿ │ │ ├──────┴┬───┴─┬──┴───┬┴────┴────┴────┴────┴────┴┬───┴──┬─┴────┼─────┬──────┤ │Ctrl │Win │Alt │ │Alt Gr│Win │Menu │Ctrl │ │ │ │ │ │ │ │ │ │ └───────┴─────┴──────┴──────────────────────────┴──────┴──────┴─────┴──────┘
Diagrams for other languages and layouts are shown on the dfns website notes about keyboards.
Alternative Input Methods
Other input methods have been developed by APL users and are described on the APL Wiki page on Typing Glyphs.
Physical Keyboards
A special physical keyboard is not required to enter glyphs. However, if you would like one, Cherry G80-3000LPCXY-12 keyboards with APL glyphs are available in UK, US, and DK layouts.
APL Font
avg ← +⌿÷1⌈⊣∘≢ ⍝ An example in the APL385 Unicode font
On most operating systems (macOS being one notable exception), installing Dyalog also installs the default public-domain APL fonts. Nevertheless, they can be downloaded and installed as follows.
Other fonts with good support for APL glyphs are listed on APL Wiki.
Manual Font Installation
Microsoft Windows
Right-click on the .ttf file and select Install.
macOS
Place the .ttf file in the /Library/Fonts/ directory.
Linux
Place the .ttf file in the /usr/share/fonts/truetype/dyalog/ directory. As root, open a command prompt and run fc-cache /usr/share/fonts
.