Typing glyphs

APL uses a range of special graphic symbols to represent most functions and operators. While keyboard mappings become memorized over time, entering APL characters can frustrate the beginner. However, a study involving high school students found that typing and using APL characters did not hinder the students in any measurable way. There are several convenient ways to enter the glyphs.



Hardware
Once the keyboard map is configured to one's liking, it may be beneficial (especially for new users learning APL) to have a keyboard with APL symbols. There are a few solutions to this, such as purchasing a dedicated desktop keyboard, key caps for mechanical keyboards, or a keyboard decal.

Note that these devices only are visual modifications on regular keyboards; they do not automatically enable entry of APL glyphs into software. For this, one of the below methods is required.

Web

 * Adám Brudzewsky's in-browser language bar adds APL keyboard functionality to most web pages on demand.

You can add this to your own web page to provide a means to enter APL symbols into a web based form or editor. It is similar to the APL language bar but is optimized for mobile devices. This is work in progress.
 * APL VK is a virtual keyboard for the APL Language for modern mobile devices.

Text editors
Keyboard layout extensions exist for several popular text editors like VS Code, Emacs and Vim. This can be an alternative, or complementary, to system-wide settings.

Linux

 * Most Linux distributions released after mid-2012 have Dyalog shifting-key support included with the distribution.


 * espanso-apl-keyboard provides text replacement entry.



Android

 * dzaima's Array Hacker's Keyboard uses a long-press to access APL glyphs.


 * Optima Systems' APL Keys provides both QWERTY keyboard (which uses long-press to select from a list of alternate glyphs), a phone pad, and a symbol view.

Windows

 * Adám Brudzewsky has various keyboard English layouts for Windows, which allow AltGr as shifting key, ` as prefix key, or ASCII symbol composition.


 * Fawn Locke offers a number of alternative Dvorak keyboard layouts for Windows, which adopt the functionality of Adám's layouts.


 * espanso-apl-keyboard provides text replacement entry.


 * The Dyalog Unicode IME uses Ctrl . Unless unselected, this IME is installed by default with Dyalog APL: Dyalog_APL_Installer.png


 * APLAutoHotKey is an application to produce configurable AutoHotKey scripts for shifting key input.


 * e-sushi has an AutoHotkey script that allows ASCII composition.

Troubleshooting
Installation of the Dyalog Unicode IME can cause so many layouts to be installed that they get in the way when switching layouts. However, the unneeded layouts can be removed through editing the registry

macOS

 * espanso-apl-keyboard provides text replacement entry.

To enable these keyboard key mappings on macOS, the appropriate  files for your locale must be downloaded and installed in the   directory:


 * Dyalog Ltd. provides keyboard layouts for Danish, Finnish, Italian, British, and American.


 * LdBeth provides a keyboard layout for Japanese (JIS).


 * ASCII symbol composition US and UK layouts are available from github.com/abrudz/kbd.

iOS

 * ohAitch's APLiOS, aimed primarily at iPadOS, provides a number bar and APL symbol layers.


 * APLKeyboard is built with Pythonista's keyboard extension. The keys are a bit small but it's functional.

By method
Most of today's APLs use a mapping which derives from the original APL\360 terminals' keyboard layout. For example, Dyalog APL's standard US English layout for 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 ⍣ │{ ⍞ │} ⍬ │| ⊣   │ │      │q ? │w ⍵ │e ∊ │r ⍴ │t ~ │y ↑ │u ↓ │i ⍳ │o ○ │p * │[ ← │] → │\ ⊢  │ ├───────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴──────┤ │Caps   │A   │S   │D   │F   │G   │H   │J ⍤ │K ⌸ │L ⌷ │: ≡ │" ≢ │Enter     │ │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 | │, ⍝ │. ⍀ │/ ⌿ │            │ └───────────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────────────┘ Additional charts for other layouts are available.

There are multiple ways to access the glyphs associated with a particular key.

Shifting key
It is quite common to use Ctrl or Alt or AltGr (right-side Alt ) as an additional shifting key. For example, AltGr + 4 would give  while AltGr + Shift + 4 would give.


 * The Dyalog Unicode IME uses Ctrl


 * NARS2000 uses Alt


 * APLX uses AltGr with an option to also use Alt

Prefix key
A prefix key is a special key or character which is entered immediately before typing the corresponding key.


 * TryAPL and ngn/apl's scripted demo interface support ` as prefix key.


 * The Dyalog Unicode IME and the Dyalog RIDE (Remote Integrated Development Environment) uses ` by default, but allows choosing any key as prefix key.


 * Adám Brudzewsky's in-browser language bar recognises all the following as prefix keys: `, ½ , ² , ^ , º  , § , ù , µ , °.


 * Custom .XCompose files can be used on Linux as described in the page Typing Glyphs on Linux.



Long-press
dzaima's Hacker's Keyboard + APL language reacts to a long-press, popping up a palette that allows selecting any of the APL glyphs associated with that button.

Keyword look-up
The Dyalog RIDE (Remote Integrated Development Environment) allows hitting the prefix key ( ` by default, but configurable) twice, followed by the (beginning of the) name of a symbol or a functionality. It then displays a drop-down of choices with arrow keys to indicate choice and the Tab key to insert the symbol. E.g. `, ` , d , i , v , Tab↹ inserts.

ASCII symbol composition
Many APL glyphs can be approximated by overlaying or juxtaposing two ASCII characters. ngn/apl's scripted demo interface, Adám Brudzewsky's in-browser language bar, and TryAPL's web interface allow such a pair of characters and hitting the Tab↹ key to replace them with the corresponding APL character. For example, <, - , Tab↹ will insert  and T , o , Tab↹ will insert.

For Windows users, e-sushi has an AutoHotkey script that allows such composition.

Text replacement
Espanso allows typing a pattern which is then immediately replaced with something else. This can be used in various ways to type APL glyphs without conflicting with application or operating system keyboard shortcuts. espanso-apl-keyboard is an Espanso configuration that emulates prefix key, so for example typing pressing `, e too type  will be end up producing the   glyph.



On-screen language bar
Several APL IDEs allow the display of a toolbar with a button for each APL glyph:


 * Dyalog APL, NARS2000, APL2 and ngn/apl's scripted demo interface all have this feature.

LaTeX
In order to typeset APL using LaTeX, you need to be sure your LaTeX engine has full Unicode support. At the time of writing, LuaLaTeX and XeLaTeX are two of the most popular such alternatives, both included with TeX Live.

After ensuring you have a LaTeX engine that is Unicode capable, you need to make sure your .tex document is using a font that has the APL glyphs you want to type. One way to do this is through the fontspec package, as seen in the example template below.

To check your setup is fully functional you can try compiling the following template:

Depending on whether you want the whole document to use the APL font or not, you may remove the command to set the main font. If you do so, APL glyphs will be rendered correctly inside code listings and similar environments, but not in the main body of the document.

Listings
LuaLaTeX and XeLaTeX can use the listings package to include APL source with the following document preamble:

plainTeX
LdBeth has made a Type1 version of 3270 font with APL support, suitable for traditional TeX implementations that cannot directly use TTF/OTF fonts.