Typing glyphs

APL uses a large 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.

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.



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

Windows

 * Adám Brudzewsky's keyboard layouts for Windows, which uses AltGr.


 * The Dyalog Unicode IME uses Ctrl . It is also possible to install the IME alongside a regular Dyalog APL installation: Dyalog_APL_Installer.png



Android
dzaima's Hacker's Keyboard + APL language uses a long-press to access APL glyphs.

Linux
Geoff Streeter authored a paper, Supporting APL keyboards on Linux, which was presented at the Dyalog '10 user meeting. In this paper, Geoff details how APL keyboards can be supported in X11 using, the X Keyboard Extension.

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

setxkbmap
The simplest way to set up an APL keyboard on Linux is with the following  command. Enter the following in your terminal emulator of choice:

An explanation:


 * assigns  (U.S. English) to be the primary layout, whereas   is secondary


 * assigns Right Alt to switch to the secondary  layout when it is pressed, otherwise   is used


 * assigns the Dyalog APL variant to the  layout which contains modifiations unique to the Dyalog language (Note the preceding comma)

A full list of keys that can be used to switch layouts is included in  under the   category.

Note: these changes are not permanent; the user will have to select one of a myriad of methods to run the command on startup. Alternatively, if they use one of the desktop environments listed below, they can follow those instructions.

GUI

 * 1) Open the Activities menu; this is located in the top-left corner of a default GNOME 3 session (alternatively, use your Super key to open the Activities overlay): Gnome-kbd-setup-1.png
 * 2) Search for "startup." When the Startup Applications program is highlighted, press the Enter key to open it: Gnome-kbd-setup-2.png
 * 3) Select the Add button on the right-hand side: Gnome-kbd-setup-3.png
 * 4) Provide a name, enter your  command, and click Add when finished: Gnome-kbd-setup-4.png

Terminal

 * 1) Navigate to   and create a   with any name that will help you remember its function.
 * 2) Add the following to the contents of your file, customizing to suit your needs:

LXDE

 * 1) Prepend an   to the   command from above:
 * 2) Add it as a line in your user's LXDE   file, located at:

For Lubuntu versions up to and including 18.04 (before the LXQt split), the location of  is.

GUI

 * 1) From your LXQt panel, navigate to Preferences → LXQt Settings → Session Settings; alternatively, enter   in your terminal emulator. You will be greeted with the following window: Lxqt-session-settings.png
 * 2) Select the   dropdown (it will be highlighted as shown above) and click the Add button to display the following pop-up window: Lxqt-add-autostart.png
 * 3) Provide a name, enter your   command, and click OK when finished.

Terminal
The above GUI approach merely creates a  file in the user's. Create your own file in the  directory whose contents are as follows, to replicate the functionality achieved through the GUI:

GUI

 * 1) Open your MATE menu (in the top-left corner of a default environment) and select Control Center at the bottom of the window: Mate-kbb-setup-1.png
 * 2) Scroll down through the main window, and under the Personal category, select Startup Applications: Mate-kbb-setup-2.png
 * 3) Click the Add button on the right-hand side: Mate-kbb-setup-3.png
 * 4) Provide a name, enter your   command, and click Add when finished: Mate-kbb-setup-4.png

Terminal
Navigate to  and create a   with any name that will help you remember its function.

Add the following to the contents of your file, customizing to suit your needs:

Xfce
A tutorial specific to Xfce's config files can be found at this GitHub repository.

Approaches to Layout and Input
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 + 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: `, ½ , ² , ^ , º  , § , ù , µ , °.



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 combination

 * Many APL glyphs can be approximated by overlaying or juxtaposing two ASCII characters. ngn/apl's scripted demo interface and Adám Brudzewsky's in-browser language bar 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.



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.



Hardware
A couple of keyboards are being sold with APL symbols pre-printed onto the key caps:


 * Dyalog sells US English, UK English, and Danish keyboards.


 * Unicomp sells both entire keyboards and separate key caps for their keyboard range.