4,493
edits
m (Fix broken Wikipedia links) |
(markup) |
||
Line 9: | Line 9: | ||
=== Linux === | === Linux === | ||
[[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 [[wikipedia:X_Window_System|X11]] using < | [[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 [[wikipedia:X_Window_System|X11]] using <source lang=console inline>xkb</source>, the [https://www.x.org/wiki/XKB/ X Keyboard Extension]. | ||
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. | 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. | ||
Line 15: | Line 15: | ||
==== setxkbmap ==== | ==== setxkbmap ==== | ||
The simplest way to set up an APL keyboard on Linux is with the following < | The simplest way to set up an APL keyboard on Linux is with the following <source lang=console inline>setxkbmap</source> command. Enter the following in your terminal emulator of choice: | ||
< | <source lang=console> | ||
setxkbmap -layout us,apl -variant ,dyalog -option grp:switch | setxkbmap -layout us,apl -variant ,dyalog -option grp:switch | ||
</ | </source> | ||
An explanation: | An explanation: | ||
* < | * <source lang=console inline>-layout us,apl</source> assigns <source lang=console inline>us</source> ([[wikipedia:American_English|U.S. English]]) to be the primary layout, whereas <source lang=console inline>apl</source> is secondary | ||
* < | * <source lang=console inline>-option grp:switch</source> assigns <kbd>Right Alt</kbd> to switch to the secondary <source lang=console inline>apl</source> layout when it is pressed, otherwise <source lang=console inline>us</source> is used | ||
* < | * <source lang=console inline>-variant ,dyalog</source> assigns the [[Dyalog APL]] variant to the <source lang=console inline>apl</source> 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 < | A full list of keys that can be used to switch layouts is included in <source lang=console inline>/usr/share/X11/xkb/rules/evdev.lst</source> under the <source lang=console inline>option</source> category. | ||
Line 36: | Line 36: | ||
==== LXDE ==== | ==== LXDE ==== | ||
Prepend an < | Prepend an <source lang=console inline>@</source> to the <source lang=console inline>setxkbmap</source> command from above, like shown: | ||
< | <source lang=console> | ||
@setxkbmap -layout us,apl -variant ,dyalog -option grp:switch | @setxkbmap -layout us,apl -variant ,dyalog -option grp:switch | ||
</ | </source> | ||
and add it as a line in your user's LXDE < | and add it as a line in your user's LXDE <source lang=console inline>auostart</source> file, located at: | ||
< | <source lang=console> | ||
~/.config/lxsession/LXDE/autostart | ~/.config/lxsession/LXDE/autostart | ||
</ | </source> | ||
For Lubuntu versions up to and including 18.04 (before the LXQt split), the location of < | For Lubuntu versions up to and including 18.04 (before the LXQt split), the location of <source lang=console inline>autostart</source> is <source lang=console inline>~/.config/lxsession/Lubuntu/autostart</source>. | ||
==== LXQt ==== | ==== LXQt ==== | ||
Line 54: | Line 54: | ||
===== GUI ===== | ===== GUI ===== | ||
From your LXQt panel, navigate to ''Preferences'' → ''LXQt Settings'' → ''Session Settings''; alternatively, enter < | From your LXQt panel, navigate to ''Preferences'' → ''LXQt Settings'' → ''Session Settings''; alternatively, enter <source lang=console inline>lxqt-config-session</source> 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]] | [[File:Lxqt-session-settings.png|frameless|LXQt Autostart menu of Session Settings window]] | ||
Select the < | Select the <source lang=console inline>LXQt Autostart</source> dropdown (it will be highlighted as shown above) and click the <kbd>Add</kbd> button to display the following pop-up window: | ||
[[File:Lxqt-add-autostart.png|frameless|LXQt add a new autostart menu item]] | [[File:Lxqt-add-autostart.png|frameless|LXQt add a new autostart menu item]] | ||
Name it whatever you want, and enter a < | Name it whatever you want, and enter a <source lang=console inline>setxkbmap</source> command that suits your taste. Shown above is the same command as detailed [[Typing glyphs#setxkbmap| in the setxkbmap section]]. | ||
===== Terminal ===== | ===== Terminal ===== | ||
The above GUI approach merely creates a < | The above GUI approach merely creates a <source lang=console inline>.desktop</source> file in the user's <source lang=console inline>~/.config/autostart</source>. Create your own file in the <source lang=console inline>autostart</source> directory whose contents are as follows, to replicate the functionality achieved through the GUI: | ||
< | <source lang=ini> | ||
[Desktop Entry] | [Desktop Entry] | ||
Exec=setxkbmap -layout us,apl -variant ,dyalog -option grp:switch | Exec=setxkbmap -layout us,apl -variant ,dyalog -option grp:switch | ||
Line 75: | Line 75: | ||
Type=Application | Type=Application | ||
Version=1.0 | Version=1.0 | ||
</ | </source> | ||
==== Xfce ==== | ==== Xfce ==== |