Typing glyphs on Linux: Difference between revisions

Jump to navigation Jump to search
1,951 bytes added ,  13:47, 19 August 2020
Add Xfce keyboard tutorial to the wiki instead of linking to external GitHub repository. Tutorial now uses xfconf-query, which is the idiomatic method (instead of manually editing the XML config files)
m (Add #! to keyboard override script)
(Add Xfce keyboard tutorial to the wiki instead of linking to external GitHub repository. Tutorial now uses xfconf-query, which is the idiomatic method (instead of manually editing the XML config files))
Line 108: Line 108:
== Xfce ==
== Xfce ==


A tutorial specific to Xfce's config files can be found [https://github.com/hashslingrz/apl-keyboard-xfce at this GitHub repository].
Xfce's GUI (<code>Settings Manager</code> → <code>Keyboard</code> → <code>Layout</code>) is unable to set up an APL-compatible keyboard. Therefore, we must do it ourselves.
 
Xfce ships with a utility, [https://docs.xfce.org/xfce/xfconf/xfconf-query xfconf-query], which allows you to manage Xfce's XML configuration files on the command line. Enter the following commands into your terminal:
 
<source lang=console>
xfconf-query -c keyboard-layout -n -p '/Default/XkbDisable' -t 'bool' -s 'false'
</source>
 
This enables [https://www.x.org/wiki/XKB/ XKB], allowing us to manage our keyboard layout.
 
<source lang=console>
xfconf-query -c keyboard-layout -n -p '/Default/XkbLayout' -t 'string' -s 'us,apl'
</source>
 
Defines the keyboard layout itself. The comma-delimited <code>apl</code> specifies a second layout group. Make sure you replace <code>us</code> with the code for your language; a list of these can be found in <code>/usr/share/X11/xkb/rules/evdev.lst</code>, under the <code>layout</code> category.
 
<source lang=console>
xfconf-query -c keyboard-layout -n -p '/Default/XkbOptions/Group' -t 'string' -s 'grp:win_switch'
</source>
 
This tells Xfce to switch to the APL layout only when the <kbd>Windows</kbd> key is pressed. When the <kbd>Windows</kbd> key is released, the layout will return to its previous setting. This is incredibly useful as the <code>apl</code> layouts in XKB do not support <kbd>Space</kbd>, <kbd>Enter</kbd>, or the arrow keys (among basically all the others). A full list of possible keys for switching between keyboard groups is located in <code>/usr/share/X11/xkb/rules/evdev.lst</code>, under the <code>option</code> category.
 
<source lang=console>
xfconf-query -c keyboard-layout -n -p '/Default/XkbVariant' -t 'string' -s ',dyalog'
</source>
 
Specifies that the variant applies to the second layout, <code>apl</code>, due to the preceding comma. The <code>dyalog</code> variant is unique to [[Dyalog]].
 
And you're done! Try holding down the Windows key and pressing <kbd>H</kbd> on your keyboard — you should see a <code>∆</code>.


== Troubleshooting ==
== Troubleshooting ==
45

edits

Navigation menu