Typing glyphs: Difference between revisions

Jump to navigation Jump to search
1,612 bytes removed ,  22:46, 4 June 2020
move typeball to fonts
(Reorganize page content to prioritize instructing readers on how to set up an APL keyboard. It is very much a WIP (would like to add instructions for more desktop environments, for example))
(move typeball to fonts)
(14 intermediate revisions by 3 users not shown)
Line 3: Line 3:
== How to Set up an APL Keyboard ==
== How to Set up an APL Keyboard ==


=== Linux ===
[[File:Adám Brudzewsky's in-browser language bar.png|thumb|right|The in-browser language bar]]
=== Web ===


[[Geoff Streeter]] authored a paper, [https://www.dyalog.com/uploads/conference/dyalog10/presentations/P19_Streeter_Keyboards.pdf Supporting APL keyboards on Linux], which was presented at the [https://aplwiki.com/wiki/Dyalog_user_meeting#Dyalog_.2710 Dyalog '10] user meeting. In this paper, Geoff details how APL keyboards can be supported in [https://en.wikipedia.org/wiki/X_Window_System X11] using <code>xkb</code>, the [https://www.x.org/wiki/XKB/ X Keyboard Extension].
[[Adám Brudzewsky]]'s [https://abrudz.github.io/lb/apl  in-browser language bar] adds APL keyboard functionality to most web pages on demand.


Most Linux distributions released after mid-2012 have [https://forums.dyalog.com/viewtopic.php?f=20&t=210 Dyalog keyboard support] included with the distribution.
=== Text editors ===


==== setxkbmap ====
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.
The simplest way to set up an APL keyboard on Linux is with the following <code>setxkbmap</code> command. Enter the following in your terminal emulator of choice:


<pre>
=== Linux ===
setxkbmap -layout us,apl -variant ,dyalog -option grp:switch
{{Main|Typing glyphs on Linux}}
</pre>


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


* <code>-layout us,apl</code> assigns <code>us</code> ([https://en.wikipedia.org/wiki/American_English U.S. English]) to be the primary layout, whereas <code>apl</code> is secondary
[[File:Hacker's Keyboard + APL language.png|thumb|right|Hacker's Keyboard + APL language]]
* <code>-option grp:switch</code> assigns <kbd>Right Alt</kbd> to switch to the secondary <code>apl</code> layout when it is pressed, otherwise <code>us</code> is used
=== Android ===
* <code>-variant ,dyalog</code> assigns the [[Dyalog APL]] variant to the <code>apl</code> 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 <code>/usr/share/X11/xkb/rules/evdev.lst</code> under the <code>option</code> category.
dzaima's [https://github.com/dzaima/hackerskeyboard Hacker's Keyboard + APL language] uses a [[wikipedia:Pointing_device_gesture#Touchpad_and_touchscreen_gestures|long-press]] to access APL glyphs.


'''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 [https://en.wikipedia.org/wiki/Desktop_environment desktop environments] listed below, they can follow those instructions.
=== Windows ===


==== Xfce ====
* [[Adám Brudzewsky]]'s [https://github.com/abrudz/Kbd keyboard layouts for Windows], which uses <kbd>AltGr</kbd>.
 
A tutorial specific to Xfce's config files can be found [https://github.com/hashslingrz/apl-keyboard-xfce at this GitHub repository].


=== Windows ===
* The [https://www.dyalog.com/apl-font-keyboard.htm#tab-1 Dyalog Unicode IME] uses <kbd>Ctrl</kbd>. It is also possible to install the [[wikipedia:Input_method|IME]] alongside a regular [[Dyalog APL]] installation:<br>[[File:Dyalog_APL_Installer.png|frameless|Dyalog APL IME selected in installer]]
* [[Adám Brudzewsky]]'s [https://github.com/abrudz/Kbd keyboard layouts for Windows], which uses <kbd>AltGr</kbd>.
* The [https://www.dyalog.com/apl-font-keyboard.htm#tab-1 Dyalog Unicode IME] uses <kbd>Ctrl</kbd>. It is also possible to install the [https://en.wikipedia.org/wiki/Input_method IME] alongside a regular [[Dyalog APL]] installation:
[[File:Dyalog_APL_Installer.png|frameless|Dyalog APL IME selected in installer]]


== Approaches to Layout and Input ==
== Approaches to Layout and Input ==
Line 56: Line 49:


There are multiple ways to access the glyphs associated with a particular key.
There are multiple ways to access the glyphs associated with a particular key.
=== Text editors ===
Keyboard layout extensions exist for several popular [[text editors]] like VS Code, Emacs and Vim. This is in addition to the availability of the below system-wide settings.


=== Shifting key ===
=== Shifting key ===
Line 70: Line 59:


* [[APLX]] uses <kbd>AltGr</kbd> with an option to also use <kbd>Alt</kbd>
* [[APLX]] uses <kbd>AltGr</kbd> with an option to also use <kbd>Alt</kbd>
for example, openSUSE 12.2, Ubuntu 12.10 and Fedora 17.


=== Prefix key ===
=== Prefix key ===
Line 83: Line 70:
* [[Adám Brudzewsky]]'s [https://abrudz.github.io/lb/apl in-browser language bar] recognises all the following as prefix keys: <kbd>`</kbd>, <kbd>½</kbd>, <kbd>²</kbd>, <kbd>^</kbd>, <kbd><s>º</s></kbd>, <kbd>§</kbd>, <kbd>ù</kbd>, <kbd>µ</kbd>, <kbd>°</kbd>.
* [[Adám Brudzewsky]]'s [https://abrudz.github.io/lb/apl in-browser language bar] recognises all the following as prefix keys: <kbd>`</kbd>, <kbd>½</kbd>, <kbd>²</kbd>, <kbd>^</kbd>, <kbd><s>º</s></kbd>, <kbd>§</kbd>, <kbd>ù</kbd>, <kbd>µ</kbd>, <kbd>°</kbd>.


[[File:Dyalog US keyboard.jpg|thumb|right|US keyboard with [[Dyalog APL]] glyphs]]
[[File:RIDE keyword lookup.png|thumb|right|RIDE keyword lookup]]
=== Android keyboard ===
 
* dzaima's [https://github.com/dzaima/hackerskeyboard Hacker's Keyboard + APL language] using long-press to access APL glyphs.
 
=== Keyword look-up ===
=== Keyword look-up ===


Line 94: Line 77:
=== ASCII symbol combination ===
=== ASCII symbol combination ===


* Many APL glyphs can be approximated by overlaying or juxtaposing two ASCII characters. [[ngn/apl]]'s scripted demo interface and [https://abrudz.github.io/lb/apl 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, <kbd><</kbd>,<kbd>-</kbd>,<kbd>Tab↹</kbd> will insert <source lang=apl inline>←</source> and <kbd>T</kbd>,<kbd>o</kbd>,<kbd>Tab↹</kbd> will insert <source lang=apl inline>⍕</source>.
* Many APL glyphs can be approximated by overlaying or juxtaposing two ASCII characters. [[ngn/apl]]'s scripted demo interface and [https://abrudz.github.io/lb/apl Adám Brudzewsky's in-browser language bar] allow such a pair of characters and hitting the <kbd>Tab↹</kbd> key to replace them with the corresponding APL character. For example, <kbd><</kbd>,<kbd>-</kbd>,<kbd>Tab↹</kbd> will insert <source lang=apl inline>←</source> and <kbd>T</kbd>,<kbd>o</kbd>,<kbd>Tab↹</kbd> will insert <source lang=apl inline>⍕</source>.


[[File:NARS2000 language bar.png|thumb|right|NARS2000 language bar]]
=== On-screen language bar ===
=== On-screen language bar ===


Line 102: Line 86:
* [[Dyalog APL]], [[NARS2000]], [[APL2]] and [[ngn/apl]]'s scripted demo interface  all have this feature.
* [[Dyalog APL]], [[NARS2000]], [[APL2]] and [[ngn/apl]]'s scripted demo interface  all have this feature.


==== Web browsers ====
[[File:Dyalog US keyboard.jpg|thumb|right|US keyboard with [[Dyalog APL]] glyphs]]
== Hardware ==
A couple of keyboards are being sold with APL symbols pre-printed onto the key caps:


* [[Adám Brudzewsky]]'s [https://abrudz.github.io/lb/apl  in-browser language bar] adds this to most web pages on demand.
* Dyalog sells [https://www.dyalog.com/apl-font-keyboard.htm#mainContent US English, UK English, and Danish keyboards].
 
* Unicomp sells both [https://www.amazon.com/Unicomp-Classic-Buckling-Spring-Keyboard/dp/B01M7V3M61/ref=sr_1_8 entire keyboards] and [https://www.pckeyboard.com/page/product/USAPLSET separate key caps] for their keyboard range.


{{APL development}}
{{APL development}}
{{APL glyphs}}
{{APL glyphs}}
[[Category:APL character set]]
[[Category:APL character set]]
== Hardware APL keyboard ==
A couple of hardware keyboards are being sold with APL symbols pre-printed onto the key caps:
* Dyalog sells [https://www.dyalog.com/apl-font-keyboard.htm#mainContent US English, UK English, and Danish keyboards].
* Unicomp sells both [https://www.amazon.com/Unicomp-Classic-Buckling-Spring-Keyboard/dp/B01M7V3M61/ref=sr_1_8 entire keyboards] and [https://www.pckeyboard.com/page/product/USAPLSET separate key caps] for their keyboard range.

Navigation menu