Skip to content

Instantly share code, notes, and snippets.

@Socialdarwinist
Socialdarwinist / Instructions for letting extra layouts appear in the desktop environment’s keyboard settings.txt
Last active February 16, 2022 16:57
Pan-Cyrillic keyboard layout based on the Russian keyboard layout
To add a new layout to your system, an example is how I added the pan-Cyrillic keyboard layout – I appended /usr/share/X11/xkb/symbols/ru by it, and as I wanted to use capslock as a fifth-level-modifier, which strangely nobody had defined until then, I included the given definition for the capslock key as fifth-level modifier in the /usr/share/X11/xkb/symbols/level5 file.
For registering the pan-Cyrillic keyboard layout, I had to include the listed XML data for the files /usr/share/X11/xkb/rules/base.extras.xml and /usr/share/X11/xkb/rules/evdev.extras.xml as a variant under the “ru” layout, that is to say nested in its <variantList> element.
Currently there is no way to add keyboard layouts without manipulating package-controlled system files, so you have to repeat these steps after each reinstallation of the X keyboard configuration files (written by the package xkeyboard-config on Arch Linux and derivates).
For this specific keyboard layout presented here this is not necessary since I contributed the layou
@Socialdarwinist
Socialdarwinist / Replaced ara file
Last active May 23, 2018 22:57
Arabic keyboard layout with bidirectional control characters and some other overlooked characters, + two generic Arabic layouts, an Ugaritic keyboard layout, an Old South Arabian keyboard layout, a Nabataean keyboard layout
default partial alphanumeric_keys
xkb_symbols "basic" {
name[Group1]= "Arabic";
key.type[Group1]="FOUR_LEVEL";
key <TLDE> { [ Arabic_thal, Arabic_shadda, Arabic_percent, U0609 ]}; // ‎ذ‎ ‎◌ّ‎ ‎٪‎ ‎؉‎
key <AE01> { [ 1, exclam, Arabic_1, NoSymbol ]}; // 1 ! ١
key <AE02> { [ 2, at, Arabic_2, NoSymbol ]}; // 2 @ ٢
@Socialdarwinist
Socialdarwinist / XML lines to be added at an appropriate place in base.xml
Last active October 18, 2024 02:20
International Phonetic Alphabet keyboard layout for XKB filled with other characters that are useful for transcribing, transliterating
<layout>
<configItem>
<name>trans</name>
<description>International Phonetic Alphabet</description>
</configItem>
<variantList/>
</layout>