Typing glyphs: Difference between revisions
Jump to navigation
Jump to search
(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)) |
(1. Revise page organization 2. Add LXDE and LXQt how-tos) |
||
Line 2: | Line 2: | ||
== How to Set up an APL Keyboard == | == How to Set up an APL Keyboard == | ||
=== Android === | |||
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. | |||
=== Linux === | === Linux === | ||
Line 10: | Line 14: | ||
==== setxkbmap ==== | ==== setxkbmap ==== | ||
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: | 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: | ||
Line 19: | Line 24: | ||
* <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>-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>-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''') | * <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. | 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. | '''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 ==== | ==== Xfce ==== | ||
A tutorial specific to Xfce's config files can be found [https://github.com/hashslingrz/apl-keyboard-xfce at this GitHub repository]. | A tutorial specific to Xfce's config files can be found [https://github.com/hashslingrz/apl-keyboard-xfce at this GitHub repository]. | ||
=== 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 [https://abrudz.github.io/lb/apl in-browser language bar] adds APL keyboard functionality to most web pages on demand. | |||
=== Windows === | === Windows === | ||
* [[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 [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]] | [[File:Dyalog_APL_Installer.png|frameless|Dyalog APL IME selected in installer]] | ||
Line 56: | Line 117: | ||
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. | ||
=== Shifting key === | === Shifting key === | ||
Line 70: | Line 127: | ||
* [[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> | ||
=== Prefix key === | === Prefix key === | ||
Line 84: | Line 139: | ||
[[File:Dyalog US keyboard.jpg|thumb|right|US keyboard with [[Dyalog APL]] glyphs]] | [[File:Dyalog US keyboard.jpg|thumb|right|US keyboard with [[Dyalog APL]] glyphs]] | ||
=== Keyword look-up === | === Keyword look-up === | ||
Line 102: | Line 154: | ||
* [[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. | ||
==== | == Hardware == | ||
A couple of 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. | ||
{{APL development}} | {{APL development}} | ||
{{APL glyphs}} | {{APL glyphs}} | ||
[[Category:APL character set]] | [[Category:APL character set]] | ||