Recently I got a Thinkpad T480 with a US keyboard layout and installed Arch (I know, the stereotype...), with KDE.
I mostly use Windows for work, and I'm used to using an American physical layout keyboard with a British English software layout. This means that to type a backslash, I hit AltGr + the key above enter (which types #), and for a pipe, I do Shift+AltGr+KeyAboveEnter.
When installing, I set my locale to en_GB.UTF8, and my keyboard to en_GB. Now, when I type AltGr+#, I get ` as a deadkey (so AltGr+#, a will make à), and Shift+AltGr+# makes deadkey ˘, for ă.
I've tried creating keyboard shortcuts for AltGr+# to invoke `xdotool type '<character I can't type right now!>' and similar, but it seems that the defaults sometimes interfere, and that I can't actually assign the key combos I want using the settings app.
I've also gone poking around in config files and managed to brick my system (KWin would crash any time I hit a key) more than once.
There are also a few other changes I'd like to make, like swapping around my Fn key and left CTRL key, and perhaps more in future, so really what I'm looking for here is advice on the most robust way to configure my keyboard layout.