Typing glyphs on Linux: Difference between revisions

Jump to navigation Jump to search
3,397 bytes added ,  15:59, 19 July 2021
Add entry on xmodmap
(Add entry on xmodmap)
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Since mid-2012, most Linux distributions with [[wikipedia:X_Window_System|X11]] have [[Dyalog APL]] keyboard support included with the distribution,<ref>[[Dyalog]] [[Forums]]. [https://forums.dyalog.com/viewtopic.php?f=20&t=210 Keyboard setup on Linux]. Sep 21, 2010.</ref> using <source lang=console inline>xkb</source>, the [https://www.x.org/wiki/XKB/ X Keyboard Extension].<ref>[[Geoff Streeter]]. [https://www.dyalog.com/uploads/conference/dyalog10/presentations/P19_Streeter_Keyboards.pdf Supporting APL keyboards on Linux]. [[Dyalog '10]].</ref>
Since mid-2012, most Linux distributions with [[wikipedia:X_Window_System|X11]] have [[Dyalog APL]] keyboard support included with the distribution,<ref>[[Dyalog]] [[Forums]]. [https://forums.dyalog.com/viewtopic.php?f=20&t=210 Keyboard setup on Linux]. Sep 21, 2010.</ref> using <source lang=console inline>xkb</source>, the [https://www.x.org/wiki/XKB/ X Keyboard Extension].<ref name="Dyalog APL XKB">[[Geoff Streeter]]. [https://www.dyalog.com/uploads/conference/dyalog10/presentations/P19_Streeter_Keyboards.pdf Supporting APL keyboards on Linux]. [[Dyalog '10]].</ref>


== setxkbmap ==
== setxkbmap ==
Line 19: Line 19:
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.
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.


'''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 [[wikipedia: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 [[wikipedia:Desktop_environment|desktop environments]] listed below, they can follow those instructions.
 
* If you want to specify a different language, say for United Kingdom, specify <source lang=console inline>gb</source> instead of <source lang=console inline>us</source> (not <source lang=console inline>uk</source>)


== GNOME ==
== GNOME ==
Line 105: Line 109:
X-MATE-Autostart-Delay=0
X-MATE-Autostart-Delay=0
</source>
</source>
== Wayland ==
Currently, [https://en.wikipedia.org/wiki/Wayland_%28display_server_protocol%29 Wayland] uses [https://www.x.org/wiki/XKB/ XKB] for keyboards, but they are not modifiable during runtime using e.g. <code lang=console>setxkbmap</code> by default. The keyboard layout must be configured and then the session restarted.
=== GNOME Tweaks ===
The [https://wiki.gnome.org/Apps/Tweaks Tweaks] tool allows configuration beyond the defaults enabled in GNOME.
# Install GNOME Tweaks using [https://wiki.debian.org/Apt apt] or [https://fedoraproject.org/wiki/DNF dnf], or by searching your distribution's Software Center.
# Start GNOME Tweaks by either:
## Using a terminal, type <code lang=console>gnome-tweaks</code> and press <kbd>Enter</kbd>.
## Using the GUI:
### Open the Activities menu; this is located in the top-left corner of a default GNOME 3 session (alternatively, use your <kbd>Super</kbd> key to open the Activities overlay):<br>[[File:Gnome-kbd-setup-1.png|frameless|Wayland Keyboard set up with GNOME Tweaks Step 2.1: Open Activities Menu]]
### Search for "Tweaks"<br>[[File:GnomeTweaks.png|frameless|200px|Wayland Keyboard set up with GNOME Tweaks Step 2.2: Start GNOME Tweaks]]
# Open Keyboard & Mouse Panel and enable "Show Extended Input Sources" <br>[[File:GnomeTweaksKeyboards.png|frameless|600px|Wayland Keyboard set up with GNOME Tweaks Step 3: Open Keyboard & Mouse Panel]]
# Open the Additional Layout Options and tick one or more of the options under "Switching to another layout"<br>[[File:GnomeTweaksKeyboardsAdditional.png|frameless|350px|Wayland Keyboard set up with GNOME Tweaks Step 4: Open Additional Layout Options]]
# Go to Settings → Region & Language → Add a new input source. Both English (United Kingdom) and English (United States) will have several APL layout options to choose from.
# Restart the session (for example, by logging out and logging in again).


== Xfce ==
== Xfce ==
Line 137: Line 158:


And you're done! Try holding down the Windows key and pressing <kbd>H</kbd> on your keyboard — you should see a <code>∆</code>.
And you're done! Try holding down the Windows key and pressing <kbd>H</kbd> on your keyboard — you should see a <code>∆</code>.
== xmodmap ==
Modifying the Linux keyboard to support APL keys via [https://linux.die.net/man/1/xmodmap xmodmap(1)] is possible, but not recommended — it has been superseded by the [https://wiki.archlinux.org/title/X_keyboard_extension X keyboard extension] (XKB). Generally <source lang=console inline>xmodmap</source> is best for simple tasks,<ref>ArchWiki Contributors. [https://wiki.archlinux.org/title/xmodmap xmodmap]. 19 July 2021</ref> which APL keyboards often tend not to be. [[Dyalog APL]], for example, has native support for XKB.<ref name="Dyalog APL XKB"/>
For users who understand the pitfalls, an example <source lang=console inline>~/.Xmodmap</source> can be [https://gist.github.com/Russtopia/20ae5ab571d5bed73359ca956d9010a7 found at this GitHub Gist].


== Troubleshooting ==
== Troubleshooting ==
=== Gnome catches keystrokes before Dyalog ===
After upgrading Ubuntu 21.04 (Hirsute Hippo), Gnome catches the keystrokes from the <kbd>Super</kbd> key to show the list of applications, before Dyalog can receive it. [[#setxkbmap|Changing the shifting key]] from <source lang=console inline>grp:win_switch</source> to <source lang=console inline>grp:caps_switch</source> avoids the issue. Changing it to <source lang=console inline>grp:rctrl_switch</source> does not work.


=== Dyalog Overrides Current Keyboard Settings ===
=== Dyalog Overrides Current Keyboard Settings ===
45

edits

Navigation menu