Typing glyphs on Linux: Difference between revisions

Jump to navigation Jump to search
Replaced localectl section, which is dependent on systemd and can have it's changes shadowed, with a more general approach. This works on any display server and even other unixes.
(Replaced localectl section, which is dependent on systemd and can have it's changes shadowed, with a more general approach. This works on any display server and even other unixes.)
Line 1: Line 1:
:''This article is specific for Linux. For Hardware and other platforms, see [[Typing glyphs]].''
:''This article is specific for Linux. For Hardware and other platforms, see [[Typing glyphs]].''


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>
Since mid-2012, most Linux distributions with [[wikipedia:X_Window_System|X11]] and [[wikipedia:Wayland_(display_server_protocol)|Wayland]] 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 29: Line 29:
* If you want to specify a different layout, dvorak, bepo, etc, change the variant flag to <source lang=console inline>dvorak,dyalog</source>.
* If you want to specify a different layout, dvorak, bepo, etc, change the variant flag to <source lang=console inline>dvorak,dyalog</source>.


== localectl ==
== libinput ==
 
X11 and Wayland use XKB rules to determine their layout. To set a layout create a file called <source lang=console inline>90-keyboard.conf</source> at <source lang=console inline>/etc/X11/xorg.conf.d</source> or <source lang=console inline>/usr/etc/X11/corg.conf.d</source>, ensuring you have permissions, and edit it to:


A server agnostic way to persist keyboard changes is though [[wikipedia:systemd|systemd]]'s <source lang=console inline>localectl</source>. To achieve the same effect as with [[#setxkbmap|setxkbmap]] run this in a terminal:
<source lang=console>
<source lang=console>
localectl set-x11-keymap us,apl pc105 ,dyalog grp:switch
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,apl"
        Option "XkbVariant" ",dyalog"
        Option "XkbOptions" "grp:switch"
EndSection
</source>
</source>
This does not affect the current session, since it just writes the changes to <source lang=console inline>/etc/X11/xorg.conf.d/00-keyboard.conf</source>. <source lang=console inline>setxkbmap</source> should be used for testing if the layout is as desired.


Unlike <source lang=console inline>setxkbmap</source>, <source lang=console inline>localectl set-x11-keymap</source> doesn't use flags so the keyboard model must be specified to change variant and options settings. <source lang=console inline>pc105</source> is a general catch all for common keyboards, a full list layouts can be found using <source lang=console inline>localectl list-x11-keymap-models</source>.
The options "us,apl", ",dyalog", and "grp:switch" are the same as in [[#setxkbmap|setxkbmap]] and can be changed to better suit your environment.
 
Once saved this will affect any future session. To change the current session and test out layouts, use <source lang=console inline>setxkbmap</source>.  


== GNOME ==
== GNOME ==
4

edits

Navigation menu