<p>RecentlyI've decided to start learning Esperanto alongside Japanese. I have my reasons for liking Esperanto, but this post is mostly on how to get the Esperanto diacritics (namely ĉ, ŝ, ĥ, ĵ, ǔ, and ĝ) on your keyboard for GNU/Linux. There are multiple ways of doing this, the ibus system has some Esperanto IMEs (like the x-system and h-system), but I'vefoundthosetobeextremelyannoyingwhiletyping(justtrytousethem,ifyou're used to typing using a Japanese IME for hiragana and katakana then this will annoy you). So instead I decided to use a method I used to use back in the day for getting Spanish tildes, dieresis, and the 'ñ' characters: Xmodmap. Basically I mapped a key I barely used (like the right `alt'and`shift' keys) to tilde and 'ñ'.</p>
<p>InthisspecificcaseIused`xev' to find out the `keycode' for my right `alt'keyandthenmadeafileinmyhomedirectorycalled`.Xmodmap' containing the line `keycode108=dead_circumflex' (make sure to change `108'withwhateveryour`xev' gives you for your dead key). After this just run `xmodmap~/.Xmodmap' and it you will be able to use the circumflex by typing the right `alt'(orwhateveryousetitto)andthenthecharacter,suchthat`ralt+s' would give 'ŝ'. <b>NOTE:</b> you do not need to hold down the `alt'key,justpressitonce;D.</p>
<p>Ittookmeforevertogetthisfiguredout,soI'mhopingthatthishelpssomeotherpoorsoulwhodoesnotwanttolookthroughthethousandsoflinkssaying"look at the KDE/GNOME docs".</p>
<p><b>UPDATE19/03/2020:</b>I've taken to using the US International keyboard layout instead of this hack, as it'smuchmoreeffectiveandnotasbuggy.ThisjustmeanschangingyourkeyboardlayouttoUSInternationalviaatoollikeIBUS,whateveryourDEuses-whichisprobablyIBUS-orputitinyourWM's init script as <code>`setxkbmap us altgr-intl'</code>.</p>