Keyboard tutorial

(Web version)


Go back (Tutorial page - Custom Keyboard Layout)


This following text was copy-pasted from the plaintext versions!

The below sections are intended to be an easy way to access this information in case you need to view this from a different device, or just don't want to download the documents manually.

This was the last major task that needed to be worked on before I marked this as completed in this site's TODO list. I also had to veto my earlier choice to follow through with the verbose version on here, too; It was just taking too long for minimal formatting with my hardware (also, this is supposed to be a games development presentable portfolio site, but at the time of writing, there's ZERO gamedev content, which is a massive problem. I need to make something). For the forseeable future, there's no plans to make this look more visually interesting - that's what the Download versions are for. There's just better things for me to spend my time on for the time being, unless I want a skill check, basically. I'm more preoccupied with finishing setup for this portfolio site.

Still, enjoy reading at your leisure.


Glossary (Document flavour)

Jump to document!
Terse Document Verbose Document

Terse Document

Return to glossary...

This is the text version of my tutorial (terse text)!

No funny stats for you!

(0) --- Glossary ---

Make sure to backup the file(s) you change! You can copy them from "/usr/share/X11/xkb/symbols to ~/Downloads" if you're not sure where to put them.

Terse glossary

Jump to section!
0 Glossary (You are here!)
1 Disclaimers!
2 Important Knowledge
3 Let's get started!
4 Extras and bonuses
5 Conclusion
6 References


Return to glossary...

(1) ---- Disclaimers ---

MAKE A COPY OF EVERY SYSTEM FILE YOU CHANGE IN THIS TUTORIAL. BACKUP COPIES ARE LIKE YOUR LIFEBOAT HERE; YOU CAN GET LOCKED OUT OF YOUR COMPUTER IF YOU BREAK ANYTHING WITHOUT KNOWING A RECOVERY METHOD.

A few things to know before you decide if you want to continue:

IF YOU CONTINUE, I'LL HAVE ASSUMED YOU'VE SEEN THE README FILE'S WARNING MESSAGE, APPLICABLE TO EVERY VERSION OF THIS TUTORIAL, PRESENT AND IDENTICAL IN EVERY FOLDER/VERSION.
YOU CAN LOSE YOUR ACCESS TO YOUR PERSONAL FILES IF YOU CAN'T RECOVER WITH A CONSOLE-ONLY SESSION.
YOU HAVE BEEN WARNED.

With all that being said, let's finally get into it!

Return to glossary...

(2) --- Important knowledge ---

The following concepts are more fully explained in the verbose version:

(2.1) - Inputting keyboard shortcuts;

Why one would want to use them (general explanation), why shortcuts work the way they do in Mint. I'll refer to shortcuts mid-tutorial with commands like "Ctrl+S" to save, etc.

Casting a VERY annoyingly large net here, but since this is going on a portfolio: This isn't a sales pitch in the off chance that you're wondering. I'm not gonna command you to make your own keyboard layout, because it's way more appropriate for you to want to handle that of your own volition; Like many unrelated things in YOUR life, YOU should be the one to want and to decide how you handle your personal system based on that want, because you're the relevant critical target/affectee in considering how this tutorial affects you as the reader.

Obviously.

(2.2) - Filesystems;

What are they, and how you'll use them to navigate where you are so that you can find stuff like "/usr/share/X11/xkb/symbols/us" from the ground-up until you can navigate a basic file manager GUI + terminal stuff. Also establishes what the root folder is if you're not used to Linux desktop distros.

(2.3) - One last thing...

Beyond everything above, you just have to make sure you have a working mouse, keyboard, and a little bit of free space on your system; Anything more than 5MB should be way more than enough in this context.

Return to glossary...

(3) --- Let's get started! ---
アニメジョークしていましょう!

I mention this plenty in here, and I'll mention this again right here just to make sure noone's skimming the text for 'the good part': YOU CAN GET LOCKED OUT OF YOUR COMPUTER IF YOU BREAK ANY SYSTEM FILE I MENTION HERE, so it is good practice to backup any files you plan on modifying to somewhere you'll remember and can easily access on your system!

Doing this will let you copy and overwrite any broken files, so you can functionally replace any component that ends up breaking if you can still read my recovery methods at the very bottom of this tutorial in [Section 4.5 - System Recovery] or the README file

.

For this tutorial, I'll be assuming you save to your Downloads folder in your user directory, which should represent whichever name you've chosen during Mint's set up. That being said, it's strongly recommended you keep all system file modifications within the folders that I mention in here in order to avoid breaking anything I'm not aware of.

Symbols file modification

You'll need to choose what file you'd like to modify inside directory "/usr/share/X11/xkb/symbols"; For this tutorial, I directly modify and set current the layout from "us" (and will focus on this throughout since this is based on my preferences), but if you either know what you're doing or want to explore other symbol files, YMMV.

Make sure to have root access when modifying your file, since you're in a system directory! Linux Mint (and plenty of other distributions) will try to have a basic guardrail to prevent accidentally damaging your system locked behind the root password you chose when installing Mint. Remember to make backups so that you can more easily copy back anything broken for a recovery session!

Once you've decided what you're going to edit, you should see a ton of code lines that contain one of more layouts like this -- we're basically going to be doing our own programming! Ignoring that a third of this is my own notes:


// This is a comment line!
 

 

// Some extra information if you're curious:
// These are modifying keywords for this layout - in context,
// 'default'
// means that this is what "English (US)" will use
// when selecting keyboards in settings,
// 'partial'
// means that this keyboard isn't required
// to have every key mapped out in here, and
// 'alphanumeric_keys'
// refers to the type of characters on this keyboard,
// like letters, punctuation, numbers, symbols, etc.
 

 

default partial alphanumeric_keys
xkb_symbols "basic" {
 

    name[Group1]= "English (US)";

 

// Explanation time:
// You can probably tell, but this is the default Eng US QWERTY
// layout; Level1 is keysym input in a neutral state, and Level2
// is what input is sent when Shift is depressed.
//
// I don't get into it in this section, but AltGr is what I
// personally use for Level3 (AltGr+...) and Level4
// (AltGr+Shift+...)
//
// If you're in-editor, don't forget to save your changes! You need
// root priveledges to modify files in (...)/symbols!

// Heads up though; I'm not explicitly sure if/how different
// flavours of Mint affects what names these use, but I'm assuming
// the only notable differences are outside the scope of this
// subject. It honestly should be fine, though. A cursory glance
// from myself shows that Mint Cinnamon, Mate, and Xfce use XKB.
    

key TLDE> {[ grave, asciitilde ]};
key AE01> {[ 1, exclam ]};
key AE02> {[ 2, at ]};
key AE03> {[ 3, numbersign ]};
key AE04> {[ 4, dollar ]};
key AE05> {[ 5, percent ]};
key AE06> {[ 6, asciicircum ]};
key AE07> {[ 7, ampersand ]};
key AE08> {[ 8, asterisk ]};
key AE09> {[ 9, parenleft ]};
key AE10> {[ 0, parenright ]};
key AE11> {[ minus, underscore ]};
key AE12> {[ equal, plus ]};
    

key AD01> {[ q, Q ]};
key AD02> {[ w, W ]};
key AD03> {[ e, E ]};
key AD04> {[ r, R ]};
key AD05> {[ t, T ]};
key AD06> {[ y, Y ]};
key AD07> {[ u, U ]};
key AD08> {[ i, I ]};
key AD09> {[ o, O ]};
key AD10> {[ p, P ]};
key AD11> {[ bracketleft, braceleft ]};
key AD12> {[ bracketright, braceright ]};
    

key AC01> {[ a, A ]};
key AC02> {[ s, S ]};
key AC03> {[ d, D ]};
key AC04> {[ f, F ]};
key AC05> {[ g, G ]};
key AC06> {[ h, H ]};
key AC07> {[ j, J ]};
key AC08> {[ k, K ]};
key AC09> {[ l, L ]};
key AC10> {[ semicolon, colon ]};
key AC11> {[ apostrophe, quotedbl ]};
key BKSL> {[ backslash, bar ]};
  

key AB01> {[ z, Z ]};
key AB02> {[ x, X ]};
key AB03> {[ c, C ]};
key AB04> {[ v, V ]};
key AB05> {[ b, B ]};
key AB06> {[ n, N ]};
key AB07> {[ m, M ]};
key AB08> {[ comma, less ]};
key AB09> {[ period, greater ]};
key AB10> {[ slash, question ]};
};

The above is the stock US English layout in Mint, where every key pressed on the keyboard maps out to the letters pressed plus consideration for shift states. Neat, right? Feel free to copy this into the top of your layout file. If you do, make sure to delete the "default" keyword from the other layout being used.

Reminder to make a backup of any system file(s) you're going to be modifying so that you can undo any mistakes you make and have a recovery option if you break anything! Also make sure you either know how to enter a recovery session or have a copy of my instructions that you'd still be able to access from this point forwards! I have info on this in [Section 4.5 - System Recovery]!


Making the custom layout file...

Anyways, this is where your own creativity and wants comes in. If you have your own reference(s), i.e. MicroSoft Keyboard Layout Creator (MSKLC) layout photos from Windows 10/11, (or your own handwritten note or something), you can totally just work out where characters are meant to go compared to your keyboard's physical layout, or just edit the file directly and trial and error your changes on your own whilst logging out and in if you'd prefer.

(I'm using the verbose version as my reference point when writing this version)
I go more in-depth in [Section 4.4 - Shortcut keys], but Mint (X11/XKB) uses keysyms, compared to Windows using scancodes. If I recall correctly, you CAN use scancodes instead if you study for it, but this is beyond my personal willpower at this point, which makes it beyond the scope of this tutorial. Still, feel free to experiment with this if you'd like, references for how these are used can be found either inside your computer at filepath /lib/python3/dist-packages/Xlib/keysymdef (the most reliable place to verify with; check 'latin' files for english characters - just don't modify these files), or as a secondary reference (and with potentially slightly different character names - I really don't want my writing to take any longer to finish, sorry), you can check out this Arch Linux keysymbols website: https://man.archlinux.org/man/extra/tk/keysyms.n.en


Applying your changes...

Save the file and verify that you have the current layout saved by going to System Settings > Hardware > Keyboard > Layout, and making sure your main layout (in my case, English (US) ) is the topmost layout in priority. I personally only want this layout, so I remove everything else.

All we need to do now is to refresh. Doing a quick logout-login should be enough; Anything to do with layout inputs seems to update whenever you're at your greeter. I'm pretty sure you can also use the following command if you want to quickly reload the cache you're using for your current layout:


sudo dpkg-reconfigure xkb-data


Final note for the main tutorial - If you want to use a framework input method (which lets you type languages like Japanese or Telugu), OR want to type with accents/diacritics, I go over that stuff in [Section 4.1] and [Section 4.2]; 4.1 is a heavier focus on accents (you need to learn some Bash scripting for it, which I'll cover here) and 4.2 is a faster-paced setup for accents and Input Methods.



That's it for the main tutorial, though!



If you'd like to send any feedback or comments my way, you can either email my business email at gabriel.dev.x10@proton.me, or check out my portfolio website at https://gabriel-dev.neocities.org to see if I've set up some sort of direct message or "public bulletin board" feature implemented for you to use by now.

Regardless of if you wanna do that, I do hope this has been helpful in deepening your understanding of Linux desktops in general! You'll notice a lot of modern distributions are designed fairly modularly, and structured in a way that'll let you add to and/or modify your system to your heart's content, or, in Mint's case, help you get your footing in the door such that you'll be able to casually use it without much external interference as far as the big ol' 26 is concerned.

Matter of fact, a lot of these systems are built to encourage you to break, deconstruct, and personalise like a destructible playground! A ton of Linux elitists will probably tell you that you haven't **REALLY** used Linux until you accidentally break your personal system at some point, even though these can be make to last without changing anything.

Very neat stuff, if you're interested in that.

Regardless, no matter which way you want to go from here, at the end of the day, what generally matters most is that you handle your gear to your personal wants and needs, and can actually enjoy using your system. Even if it's just that you want to use your browser or play games or something, it's all A-OK, truly.


...

Anyways, I'm done here, and I hope you have an amazing rest of your day!


.
.
.
.
.

Auctioneer:

test
test
.

....Sooooiee~!...

.
.
.
.



*☎ clank!*









Return to glossary...

(4) --- Extras and Bonuses! ---

Oh, wait, I guess I'm not done quite yet, since there's a few problems that I'm aware can happen with this method...

I'll try to keep this clean; More detailed explanations are available in the verbose version of this document. Let's get into it, shall we?

Making a layout with accent marks (disclaimers)

There's at least two components you can use to handle typing chars with diacritics/accents: Deadkeys and normal (dedicated) mappings.

Deadkeys mean that you can press a keysym slot, then press another key (like a vowel) in order to input chars like â-É-ì-Ò-û. Dedicated keys are exactly what they sound like: You can use a specific keysym like "ccedilla" or "Ccedilla" in whatever slot you want to output ç/Ç.

Also, remember when we mentioned Level1/Level2 slots from before, and how they coordinated to neutral-state/Shift-depressed? You can add on Level3/Level4 states that add AltGr-depressed in a combinatorics sort of way:


xx - No Shift, No AltGr (neutral)
ox - Shift ON, No AltGr (shift-depressed; Shift+char)
xo - No Shift, AltGr ON (altgr-depressed; Alt+char)
oo - Shift ON, AltGr ON (shift-depressed altgr-depressed; Shift+AltGr+char)
(the web version is NOT made with love, I'm doing the bare minimum and don't feel like figuring out HTML/.CSS color formatting across this document. no pretty colors for you.)

On your tilde key, this looks like:


{

key {[ xx, ox, xo, oo ]};

};


So you just have to correlate the keysym that you want for the action on your keyboard.

And in case you're not already aware, AltGr refers to the right alt key on a 100% keyboard.

In my example layout, I'll do something like this:


default partial alphanumeric_keys
xkb_symbols "basic" {
    

name[Group1]= "English (US)";
    

// Example of levels:
// key slot> {[Level1 - neutral, Level2 - Shift state, Level3 - AltGr state, Level4 - Shift+AltGr state]};
    

key AD11> {[ dead_grave, dead_grave, bracketleft, braceleft ]};
key AD12> {[ dead_acute, dead_acute, bracketright, braceright ]};
    

key BKSL> {[ dead_circumflex, dead_circumflex, backslash, bar ]};
    

key AB03> {[ c, C, ccedilla, Ccedilla ]};
}

You can probably tell, but with this, pressing AD11 on my keyboard and then a vowel will give me one of the following depending on the vowel itself:


aeiou -> âêîôû
AEIOU -> ÂÊÎÔÛ

If I want to use "[]", I'll press AltGr to make that happen (but you'll need to have a startup file for that - explained shortly), and the opposite logic is going on for my c key since this is an English/French layout.

As a reminder, you should find English-relevant keysymbol names for these accents in the directory at filepath "/lib/python3/dist-packages/Xlib/keysymdef"; I'm assuming that you need to use English-relevant names since they're what latin1.py uses in the directory that I've just mentioned. If you'd like something outside of this, you will probably need to handle setting up an Input Method on your machine - check your System Settings-equivalent for your Mint flavor or see [Section 4.2.1].

WARNING: The files in ./keysymdef are all referenced dynamically by the other components of your machine and are needed to make sure Linux Mint's keyboard can function, so please don't modify or delete any of them!

Making a layout with accent marks (execution)

In order to actually use AltGr for Level3/Level4, I'm gonna jump straight to making the relevant autostart directory (don't substitute a different directory for this unless you know what you're doing):


mkdir -p $HOME/.config/autostart

Then, make the .desktop file named "startup-enable-altgr.desktop" that we're gonna execute on login from the greeter, and add contents (change "exec" line to point to where you'll place the Bash script that'll be called to make this persistent):


[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/user/.config/autostart/startup-enable-altgr.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Icon=accessories-text-editor
Name=Enable XKB AltGr
Comment=Runs command: "/usr/bin/setxkbmap -layout us -option lv3:ralt_switch"
X-GNOME-Autostart-Delay=0

And now, the Bash .sh script named "startup-enable-altgr.sh":


#!/bin/sh
/usr/bin/setxkbmap -layout us -option lv3:ralt_switch

Now, make sure both scripts are in /home/user/.config/autostart and make sure Linux grants them execute permissions with the following commands:


sudo chmod a+rx startup-enable-altgr.desktop
sudo chmod a+rx startup-enable-altgr.sh

And, like I mentioned in the Verbose script, you can expand Bash scripts to work well beyond the scope of this tutorial to enable useful tools like timers, etc and handle automation. Here's some freebie code that gets the current executing script's filepath, up to the current containing directory:



#!/bin/sh
VAR_THIS_SCRIPT_PATH="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"


If you want your changes to take effect, just log out and log back in again. You can use "sudo dpkg-reconfigure keyboard-configuration" (which will change the layout used for devices using LUKS password-protected encryption) as an aid to quickly figure out what options you can look up in order to find some documentation or the like, and check System Settings > Preferences > Startup Applications to see if your changes took effect. You can see the .desktop command inside System Settings > Preferences > Startup Applications.

Using accents and Fcitx at the same time...

If you're not aware, you can type in Chinese, Japanese, Korean, Thai, Vietnamese and Telugu out of the box by heading into System Settings > Preferences > Input Settings, and using an input framework to use your target language. In my case, I use Fcitx for Japanese, so it's what I'll be using as an example here. You should be able to use Fcitx and type using accents on the same layout without anything conflicting.

Fcitx troubleshooting

Check that you can switch Mozc on/off by pressing Ctrl+Space while in an input field, like Firefox's search bar, a text editor program or your Mint Menu. If a tiny popup shows under wherever your text cursor is and can type Japanese kana, you can skip this subsection; Fcitx is working normally.

If it isn't working, check that you have Fcitx on by going to System Settings > Input Method > Japanese, and double checking that you have all the instructions down that Mint tells you to do. At worst, you can change your input method framework to 'None', reboot, setting it back to 'Fcitx', checking your instructions again and logging out and in again. If it doesn't work, then it's likely that something deeper into your system is breaking, but that seems to be beyond the scope of this tutorial since I can't readily identify Input Method issues. As a reminder, I used the following filepath for my keyboard layout: "/usr/share/X11/XKB/symbols/us".

Accents troubleshooting

I went into an actual solution in [Section 4.1.1], but basically, assuming you're on a system that hasn't been damaged or modified or something as it pertains to anything XKB-related, then you probably just need to have your accents enabled. I don't have enough time to study and cover every way you can do this without pretending my guesses are confirmed to be true, but here's what I use to have Level3/Level4 symbols be inputable when AltGr (the right alt key) is depressed:


/usr/bin/setxkbmap -layout us -option lv3:ralt_switch

If you run that command in-terminal, it should enable your AltGr deadkeys properly - just make sure that the "us" part matches the name of the symbol file you're currently using in System Settings > Hardware > Keyboard > Layouts (you can see a full list of these files at filepath "/usr/share/X11/xkb/symbols").

Test that this works by pressing AltGr/your right Alt key, a key that's assigned to a deadkey while AltGr is pressed, then a relevant character while your text cursor is somewhere you can type in, like your Menu panel or your browser's search bar. If running this command fixes your AltGr problem, then you probably need to make this change persistent - nothing on Mint remembers your preference; Check [Section 4.1.1] if you're dealing with this.

You can also try running the following command in-terminal for a more in-depth setup menu that you can use to help gauge what options you have available to you as well, but I'm pretty sure won't make any permanent changes to how AltGr works during normal use in Mint Cinnamon at the time of writing:


sudo dpkg-reconfigure keyboard-configuration

Quick note that this command will change the layout used when powering on your Mint session with LUKS encryption pre-login/pre-greeter screen initialisation.

Using keyboard configuration utility

I wasn't able to properly confirm and connect this to anything in here (and didn't feel like doing a fresh Mint install to test this because of how long this tutorial took to make), but I did mention that you can run this command to run a keyboard setup utility a couple of times:


sudo dpkg-reconfigure keyboard-configuration

I didn't notice anything beyond making changes to how the LUKS encryptor handles its default keyboard layout after modifying my us symbol file/layout. It seems to be very thorough, but otherwise there's nothing crazy going on there as far as I've noticed. Changes require a restart to take effect.

If you want to copy my settings (inside sudo dpkg-reconfigure keyboard-configuration):


> Generic 105-key PC
> English (US)
> English (US)
> Right Alt (AltGr) (required for my method, but explore options if you want)
> No compose key
> Yes if prompted for "Use Ctrl+Alt+BKSP to kill X process?" (Forces you into your login screen when picked up by your system)

My shortcut keys are scrambled!

This is normal behaviour.

Basically, Linux Mint uses 'key symbol' (keysym) interpretation instead of something like Window's 'keycode' (scan code) bindings. It took some getting used to, but I personally prefer the way Linux does it just because it's way more consistently-applied to everything compared to Windows10/11; Inkscape's behaviour is the exact same on this front for Mint and Windows10+, but is an outlier compared to Window's Modus Operati-type of behaviour.

This is my personal preference. Tools seem more palatable to me, but games might need a default QWERTY layout in order to work. Don't be scared to go into "/usr/share/X11/xkb/symbols/us" to swap what the 'default'-keyworded layout is as-needed. Here I go rambling on the non-rambling version of this tutorial. Feh!

I think the two options for what to do here are to either remap your key bindings/shortcuts on a system level as well as rebind for every tool, OR to just adjust to the new bindings as a whole, ignoring there being a way to potentially do a scancode option if you're willing to look for it.

Annoying? Maybe. Probably, actually. It depends on how you're built as a person/What you're willing to be adaptive to, really.

If you want to make your own shortcuts, you can go to System Settings > Hardware > Keyboard > Shortcuts. I think you can also find/make your own .conf file, maybe after actually making a shortcut in the Keyboard/Shortcuts window, but I haven't explored this aspect at the time of writing.


SYSTEM RECOVERY

The most direct fix to anything this tutorial could've done would be to replace any modified files with their originals/undo your changes. Don't worry, it's not as scary as it's probably gonna sound in a second. I'll show two ways you can handle this.



We can system recovery the TTY way... (Easier method)

Step 1) Shift to a TTY menu

You can normally access the TTY menu post-boot via Ctrl+Alt+F1 through Ctrl+Alt+F6, and exit this shell environment via Ctrl+Alt+F7. Login with username and password.

If you're softlocked, i.e. the window won't stay open long enough for you to log in due to the login screen constantly trying to open, you're going to have to skip ahead to Section 4.5.2; Besides the more complex starting point, everything else will be doing the same thing starting from this solution's step 2.

Step 2) Navigating TTY and swapping out damaged files

Navigate to where you left your symbol file using "cd --help", and ls to list the contents of the current working directory (the directory you're at). This tutorial recommended saving backups to ~/Downloads. You can type "sudo cp -i us /usr/share/X11/xkb/symbols" to copy the backup back into place.

For this file change to take effect, type the following command to reboot:


systemctl reboot



...or we can system recovery the console way. (Harder method)

Step 1) Get into your bootloader

I'm going to assume that you're using GRUB as the middle manager of your system's initialization; If not, you can either study which one you're using/how to access it OR use an online AI chatbot to expedite discovering what your equivalent of this is. The specifics getting here can vary a ton depending on how your computer and it's firmware was designed, which I can't reasonably account for in here due to that scope being WAYY outside of this tutorial and personal willpower. I'll still at least try to guide you here, though...

Start with shutting down your computer and turning it back on; If you can't do it normally you can force a shutdown by holding down the powerbutton for a few seconds. If GRUB doesn't show its pre-Mint menu by default for you, it's probably set to discretely run. It'll likely show if you press your Esc or Shift key multiple times during boot, probably after your system's splash screen.

Step 2) Edit GRUB's boot settings (temporary changes)

Once you're at the GRUB menu, highlight your active Linux kernel (probably the topmost 'Linux Mint Cinnamon 22.3' option) and press E to temporarily change your boot settings by going into the file editing window. From there, navigate to the end of the 'linux' line/command, and add "systemd.unit=multi-user.target" to it (make sure there's a space before this append!). If everything is on one line for you, you're probably going to have to intuit where linux's line ends and the next one begins by placing this before where the next thing with an equal sign is, or feeling out where the parameters that modify 'linux' ends. Again, this might vary, and there'll probably be instructions on how to do this somewhere in the margins, but you should be able to run your changes for the next session only by pressing Ctrl+X or F10.

Step 3) Navigating console-only and swapping out damaged files

Navigate to where you left your symbol file using "cd --help", and ls to list the contents of the current working directory (the directory you're at). This tutorial recommended saving backups to ~/Downloads. You can type "sudo cp -i us /usr/share/X11/xkb/symbols" to copy the backup back into place.

Once finished, you can turn your system off and on by running the following command:


systemctl reboot

You should be good to go!

Return to glossary...

(5) --- Conclusion ---

That's everything you need to know!

This is my first time doing any documentation, and WOW was there a lot of text written for the verbose version... and terse version... across plaintext, .PDF, .MD and web forma-- you know what? This took a lot longer to finalize than I would've liked. If I wanna do something like this again, I'll need to figure out a more efficient pipeline for future projects.

Still, hopefully this was able to give you a complete understanding of everything you could possibly need to know for everyday XKB use!

If you have any feedback or want more features, feel free to suggest them at my email or request separate additions here: gabriel.dev.x10@proton.me, or check out my portfolio website at https://gabriel-dev.neocities.org to see if I've set up some sort of direct message or "public bulletin board" feature implemented for you to use in the future (until within a couple of months of publishing, this is unlikely).

Return to glossary...

(6) --- References ---

Here's everything external-ish mentioned in both terse and verbose versions of the tutorial, if interested.

Links:

..X11/XKB manual page (I tried looking for a more appropriate manual page for your keysyms reference, but the stuff I found didn't seem particularly relevant for non-developers at a glance, sadly.)
https://www.x.org/XKB/
https://xkbcommon.github.io/libxkbcommon/index.html
https://xkbcommon.org/doc/current/xkb-intro.html#xkb-the-config

X11/XKB symbols directory/folder: /usr/share/X11/XKB/symbols/us

Keysym built-in names: /lib/python3/dist-packages/Xlib/keysymdef (check for "latin[n]" names for symbols + latin-based alphabets especially)

Arch Linux symbols list: https://man.archlinux.org/man/extra/tk/keysyms.n.en

English spellings for diacritics: https://en.wikipedia.org/wiki/Diacritic

Terminal/Bash operatands: https://www.networkworld.com/article/2516127/linux-operators-using-and-many-more.html

Bash Bible - https://github.com/dylanaraps/pure-bash-bible


Commands that you can collect like pokémon cards:

cd ..
cd /
sudo cp (filename) (absolute path)
sudo mv -i (filename) (relative path)
sudo dpkg-reconfigure keyboard-configuration
sudo dpkg-reconfigure xkb-data
ln -s (target path) (name - default -> original filename)
ls
mkdir -p $HOME/.config/autostart
/usr/bin/setxkbmap -layout us -option lv3:ralt_switch
systemctl reboot

Desktop file code:


[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/*user*/.config/autostart/startup-enable-altgr.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Icon=accessories-text-editor
Name=Enable XKB AltGr
Comment=Runs command: "/usr/bin/setxkbmap -layout us -option lv3:ralt_switch"
X-GNOME-Autostart-Delay=0

Bash (.sh) script code:


#!/bin/sh
/usr/bin/setxkbmap -layout us -option lv3:ralt_switch

Poweruser Bash (.sh) code:


VAR_THIS_SCRIPT_PATH="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"


There's a terms glossary in the verbose version of the tutorial if you want it!


Return to glossary...

- - -
- - -











I hope you're not waiting on my permission to leave...




Verbose Document!

Return to glossary...

I've changed my mind, and decided NOT to follow through with the Verbose document; I can't comfortably edit with this much text on my hardware, and I want to stay within neocities' web editor for now. If I get any requests for this document's web version, then I might give it priority.

(I'm building everything here solo, so it WILL take a while to get here, though; Please keep that in mind if you want to ask for this to be added.)

There's a 'Downloads' section available here in the meantime