About the Glyphs
APL is distinguished by its use of symbols to represent primitive functions and operators. It does not take long to get used to typing these glyphs, and there are some different methods available to suit your preference.
This page contains resources that are believed to be of general interest to the APL community. The fonts are freely available to everyone, irrespective of whether you use Dyalog (or any other APL system for that matter).
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 US and UK English layouts) is pressed and produces no output. The subsequent key press can produce a glyph. For example, ` followed by Shift + 6 produces ⍉.
A shifting key is a key which, while held, enables APL glyph input when pressing other keys. For example, APL + Shift + 4 produces ⍋.
The Dyalog IME for Microsoft Windows supports both shifting key input using Ctrl and customisable prefix key input.
TryAPL also includes the Tab input method, but it is not well supported outside of TryAPL.
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.
Purchase a Physical Keyboard
A different keyboard is not required to enter Dyalog glyphs. However, if you would like one, Black Cherry G80-3000LPCXY-12 keyboards with Dyalog glyphs engraved are available in UK, US, and DE layouts. These keyboards use the Cherry MX Black (Linear travel) switches, and USB and PS2 adapters are included. The keyboards have been tested using both Microsoft Windows and Linux.
To order a keyboard, please e-mail us with details of the locale you require and your shipping address; we will then send you details of shipping costs and payment instructions. See prices.
The Dyalog APL physical keyboard is available in the following locales (click to see large image):
APL Font
On most operating systems (macOS being one notable exception), installing Dyalog also installs Adrian Smith’s Unicode APL font, which has become the industry “standard” and is used by several vendors. The ability of modern operating systems to render APL characters well has also dramatically improved in recent years, which means that web pages or source code containing APL can be viewed without problems.
For licensing purposes, Adrian states on his website that “All fonts listed on this page are original artwork by Adrian Smith, and are freely placed into the public domain.”
Other fonts with good support for APL glyphs are listed on the APL Wiki page about fonts.
Installation and Setup
Installing the Font
Navigate to the downloaded .ttf file in Windows Explorer, right-click on it and select Install from the drop-down menu.
NOTE: The setup_fonts.msi file contains all the fonts supplied with the Microsoft Windows versions of Dyalog, including APL385 (for Dyalog Unicode edition) and the Dyalog Symbol (for Dyalog Classic edition) fonts. To install these fonts, double-click on the downloaded setup_fonts.msi file and follow the on-screen instructions.
Enabling the Keyboard Key Mappings
The Dyalog Unicode IME defines the mapping of keystrokes to Unicode characters – it can be regarded as an overlay of the standard keyboard which contains just APL characters. It enables APL characters to be input into any Microsoft Windows application that supports IME input, including Dyalog Unicode Edition (not Classic), PuTTY, Notepad and the Microsoft Office Suite.
NOTE (May 2022): If you are using Microsoft Windows 11, then you might find that the standard Dyalog IME does not work with UWP (Universal Windows Platform) applications such as Notepad. We are working on both immediate and long-term solutions to meet our customers’ wide range of needs.
The version of the Dyalog Unicode IME that should be downloaded and installed is dependent on whether a 32-bit or 64-bit version of the Microsoft Windows operating system is installed:
NOTE: These .msi files should support any Dyalog Unicode edition from version 12.1 onwards, providing that the interpreter has a build date later than 20 April 2011. Dyalog Ltd recommends that you always install the latest version of the Dyalog Unicode IME that is available.
Installing the Dyalog IME
To install the Dyalog Unicode IME, download the appropriate .msi file.
Double-clicking on the downloaded .msi file does not install the IME successfully; instead, open a Command Window by right‑clicking on the command prompt and select Run as Administrator from the drop-down menu (running with raised privileges is essential to the success of the installation of the IME). In the Command Window, navigate to the directory that contains the downloaded .msi file and enter msiexec /i setup_ime_64.msi (or msiexec /i setup_ime_32.msi). Select the appropriate options in the dialog boxes that are displayed.
After installation you must reboot your PC to complete the installation process. If you already have a Dyalog Unicode IME installed and want to update it, then you must uninstall the currently installed version and reboot your PC before installing the new one.
Documentation
The Dyalog for Microsoft Windows UI Guide includes:
- Configuring the Dyalog IME (from within a Session or in the Microsoft Windows taskbar)
- Configuring automatic selection of the APL keyboard each time a session is started (Unicode edition only)
Diagrams showing the keyboard layouts can be found on the keyboard layout page of the dfns website.
More hints and tips about using the Dyalog Unicode IME can be found in the FAQ section of the Dyalog forum. For example:
- Why does my Unicode Dyalog stop giving APL characters?
- How to remove Dyalog APL IME?
- Dyalog (Unicode) Problem typing APL characters on Windows 8?
- Why don’t Ctrl-X, Ctrl-C, and Ctrl-V work in Dyalog Unicode?
- Problems with entering ⍲ (NAND) under Vista and Windows 7
- Unable to type any APL characters in Dyalog (Unicode)
- Windows 10: adding Dyalog Unicode IME as an input method
NOTE: When installing Dyalog for macOS, the font and keyboard mappings are automatically installed and enabled for use in a Dyalog Session – the following allows use of Dyalog glyphs both outside and inside a Dyalog Session (for example, in email).
Installing the Font
Place the downloaded .ttf file in the /Library/Fonts/ directory.
Enabling the Keyboard Key Mappings
To enter Dyalog glyphs, the keyboard key mappings must be enabled. To enable these keyboard key mappings on macOS, the appropriate DyalogAlt.keylayout and DyalogAlt.icns files for your locale must be downloaded and installed in the /Library/Keyboard Layouts directory. To download a zip file containing these files, click on the relevant flag (if the country you require is not available, or you want to customise one of these layouts, then please refer to this forum post):
Download DyalogAlt.keylayout and DyalogAlt.icns files:
The keyboard key mappings installed with these files are enabled whenever the Dyalog keyboard is selected in the main menu bar. The following locale-specific images show these keyboard key mappings. To enter Dyalog glyphs using these keyboard key mappings, hold down the key combination shown shaded in the following images and press the appropriate character key.
Diagrams showing the keyboard layouts can be found on the Mac keyboard layout page of the dfns website.
Documentation
The Dyalog for macOS Installation and Configuration Guide includes detailed instructions for:
- installing the APL385 Unicode font
- using the DyalogAlt.keylayout file to enable keyboard key mappings
NOTE: When installing Dyalog on the Raspberry Pi, (or any other Debian-based Linux distribution), the fonts and keyboard mappings are automatically installed and enabled.
Installing the Font
Most non-Debian-based Linux distributions include fonts that can display the APL character set. However, if the APL385/APL333 font is required, then place the downloaded .ttf file in the /usr/share/fonts/truetype/dyalog/ directory. As root, open a command prompt and run fc-cache /usr/share/fonts.
Enabling the Keyboard Key Mappings
Most Linux distributions released after mid-2012 have Dyalog keyboard support included with the distribution, for example, openSUSE 12.2, Ubuntu 12.10 and Fedora 17. Keyboard support for other window managers (for example, Gnome and Unity) is in a state of flux; the latest information about the process of installing and configuring Dyalog keyboard support for such environments can be found on the Dyalog forum or by e-mailing us.
Documentation
The Dyalog for UNIX Installation and Configuration Guide includes detailed instructions for:
- configuring the terminal window for Dyalog keyboard support (global per user per UI)
- generating APL glyphs through the PuTTY terminal emulator by installing the Dyalog Unicode IME and APL385 font
For Linux distributions that have Dyalog keyboard support included with the distribution, a diagram showing the keyboard layout can be found in the /usr/share/X11/xkb/symbols/apl file.
Diagrams showing the keyboard layouts can be found on the keyboard layout page of the dfns website.