Either replace (or hand-edit) your "ru" file : /usr/share/X11/xkb/symbols/ru with the file in this repo. I changed (for simplicity) the "Russian" layout. Add the "Combining Acute" (0x01000301) as I do for the <TLDE> key.
Example: key <TLDE> { [ 0x01000301, tilde ] };
Now when you press this key (Tilde) and the preceding letter gets a diacritic!
Activation XFCE:
- Go to XFCE keyboard control panel (Layout Tab)
- Remove and re-add the Russian keyboard layout
- Switch in and out of the Russian keyboard and the new keyboard layout should be activated
If you're interested in "going deep" with xkb modifications, I found this page extremely helpful. https://medium.com/@damko/a-simple-humble-but-comprehensive-guide-to-xkb-for-linux-6f1ad5e13450
Pressing the OPTION key + letter gives the unicode character with diacritic for emphasis. This can be particularly helpful for language learners that need to remember where to place the emphasis. e.g.: (option+letter => я́,е́,ё́,ы́,у́,и́,о́,ю́).
CAPS LOCK quickly switches to Roman characters (makes for quick translations/navigation on a Mac with a non-Russian operating system)
- Copy the .icns and .keylayout files to your ~/Library/Keyboard\ Layouts folder.
- Restart
- Go to keyboard in System Preferences, select Keyboard, "Input Sources", Click '+", Go to "Others" and select Русский!
If the layout is not visible in the System Preferences, Keyboard, Input Sources restart your Mac