|
|
(13 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 == |
|
| |
|
| === Android === | | [[File:Adám Brudzewsky's in-browser language bar.png|thumb|right|The in-browser language bar]] |
| | === Web === |
|
| |
|
| Dzaima's [https://github.com/dzaima/hackerskeyboard Hacker's Keyboard + APL language] uses a [https://en.wikipedia.org/wiki/Pointing_device_gesture#Touchpad_and_touchscreen_gestures long-press] to access APL glyphs.
| | [[Adám Brudzewsky]]'s [https://abrudz.github.io/lb/apl in-browser language bar] adds APL keyboard functionality to most web pages on demand. |
|
| |
|
| === Linux === | | === Text editors === |
|
| |
|
| [[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]. | | 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. |
|
| |
|
| 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.
| | === Linux === |
| | {{Main|Typing glyphs on Linux}} |
|
| |
|
| ==== setxkbmap ====
| | Most Linux distributions released after mid-2012 have Dyalog keyboard support included with the distribution. |
|
| |
|
| 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:
| | [[File:Hacker's Keyboard + APL language.png|thumb|right|Hacker's Keyboard + APL language]] |
| | | === Android === |
| <pre>
| |
| setxkbmap -layout us,apl -variant ,dyalog -option grp:switch
| |
| </pre>
| |
| | |
| An explanation:
| |
| | |
| * <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
| |
| | |
| * <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
| |
| | |
| * <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.
| |
| | |
| | |
| '''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.
| |
| | |
| ==== LXDE ====
| |
| | |
| Prepend an <code>@</code> to the <code>setxkbmap</code> command from above, like shown:
| |
| | |
| <pre>
| |
| @setxkbmap -layout us,apl -variant ,dyalog -option grp:switch
| |
| </pre>
| |
| | |
| and add it as a line in your user's LXDE <code>auostart</code> file, located at:
| |
| | |
| <pre>
| |
| ~/.config/lxsession/LXDE/autostart
| |
| </pre>
| |
| | |
| For Lubuntu versions up to and including 18.04 (before the LXQt split), the location of <code>autostart</code> is <code>~/.config/lxsession/Lubuntu/autostart</code>.
| |
| | |
| ==== LXQt ====
| |
| | |
| ===== GUI =====
| |
| | |
| From your LXQt panel, navigate to ''Preferences'' → ''LXQt Settings'' → ''Session Settings''; alternatively, enter <code>lxqt-config-session</code> in your terminal emulator. You will be greeted with the following window:
| |
| | |
| [[File:Lxqt-session-settings.png|frameless|LXQt Autostart menu of Session Settings window]]
| |
| | |
| Select the <code>LXQt Autostart</code> dropdown (it will be highlighted as shown above) and click the <code>Add</code> button to display the following pop-up window:
| |
| | |
| [[File:Lxqt-add-autostart.png|frameless|LXQt add a new autostart menu item]]
| |
| | |
| Name it whatever you want, and enter a <code>setxkbmap</code> command that suits your taste. Shown above is the same command as detailed [[Typing glyphs#setxkbmap| in the setxkbmap section]].
| |
| | |
| ===== Terminal =====
| |
| | |
| The above GUI approach merely creates a <code>.desktop</code> file in the user's <code>~/.config/autostart</code>. Create your own file in the <code>autostart</code> directory whose contents are as follows, to replicate the functionality achieved through the GUI:
| |
| | |
| <pre>
| |
| [Desktop Entry]
| |
| Exec=setxkbmap -layout us,apl -variant ,dyalog -option grp:switch
| |
| Name=apl-keyboard
| |
| OnlyShowIn=LXQt;
| |
| Type=Application
| |
| Version=1.0
| |
| </pre>
| |
| | |
| ==== Xfce ====
| |
| | |
| A tutorial specific to Xfce's config files can be found [https://github.com/hashslingrz/apl-keyboard-xfce at this GitHub repository].
| |
|
| |
|
| === Text editors ===
| | 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. |
| | |
| 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 [https://abrudz.github.io/lb/apl in-browser language bar] adds APL keyboard functionality to most web pages on demand.
| |
|
| |
|
| === Windows === | | === Windows === |
Line 93: |
Line 26: |
| * [[Adám Brudzewsky]]'s [https://github.com/abrudz/Kbd keyboard layouts for Windows], which uses <kbd>AltGr</kbd>. | | * [[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: | | * 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]] |
| [[File:Dyalog_APL_Installer.png|frameless|Dyalog APL IME selected in installer]] | |
|
| |
|
| == Approaches to Layout and Input == | | == Approaches to Layout and Input == |
Line 138: |
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]] |
| | |
| === Keyword look-up === | | === Keyword look-up === |
|
| |
|
Line 146: |
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 154: |
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. |
|
| |
|
| | [[File:Dyalog US keyboard.jpg|thumb|right|US keyboard with [[Dyalog APL]] glyphs]] |
| == Hardware == | | == Hardware == |
| A couple of keyboards are being sold with APL symbols pre-printed onto the key caps: | | A couple of keyboards are being sold with APL symbols pre-printed onto the key caps: |