What methods or programs are available for typing the characters with accents on Linux?
There are at least three methods that I know of (I am using XUbuntu 15.10):
You can add an Esperanto keyboard layout. That is done differently for different graphical environments, assuming a graphical environment. The effect is that you can now switch to the new layout and type in Esperanto. It is QWERTY but some of the English letters have been replaced with Esperanto ones. Specifically:
- q → ŝ
- w → ĝ
- y → ŭ
- [ → ĵ
- ] → ĥ
- x → ĉ
The downside is that you lose the ability to write those English letters. I managed to do it by holding down AltGr but that might be related to me also having the US International keyboard (don't ask, X is a mess).
If you are using the US layout, you can change that to the US Internation with dead keys at AltGr. Then you can type the Esperanto characters like that:
- For ĉ, ĵ, ĝ, ĥ and ŝ: Hold down AltGr and press 6, then release everything and press the desired letter — c turns to ĉ, s to ŝ and so on.
- For ŭ: Hold down AltGr+Shift and press 9, then release everything and press u.
This requires to execute a command, and assumes you are using the “X window manager” (you most likely are) with single layout. So, just execute:
setxkbmap -option esperanto:qwerty
This makes your normal US layout (International or not) work in a new way. Now when you hold AltGr and press a letter, you get the accented one. So AltGr+c → ĉ, AltGr+s → ŝ and so on, also AltGr+u → ŭ.
This works only for the current session and current layout, so you’ll have to do it at every computer start. However, that is easily fixed, just make that command execute at every login in the graphical shell (there are various methods, search the Internet). At least for me, however, this breaks the Alt+Shift toggling between keyboard layouts (I also have Bulgarian layout). So to fix that, I have to also execute (after that command):
setxkbmap -option grp:lalt_lshift_toggle
And that’s it. Just add (if you need to) that command to that start-up script after the first one.
I personally use method 3, and I suggest it to everyone because it is very easy to use once configured.
[EDIT]: Apparently, on some Desktop Environments (Cinnamon, Mate) you can achieve the same effect as method 3 via a user interface, which most likely does something similar under the hood but is a lot more user-friendly. See the other answers for details.
Linux Mint (Cinnamon) has an option for this under the System Settings menu:
System Settings -> Hardware -> Keyboard -> Keyboard layout -> Options -> Adding Esperanto supersigned letters.
Then click the button by "To the corresponding key in a Qwerty layout".
You can now use
C to type ĉ and
C to type Ĉ and so on.
Be aware: with enabled "extra typographic characters" this won't work.
En Ubuntu la eblecon 'Adding Esperanto circumflexes (supersigno)' malaperis ekde Ubuntu 14, sed eblas instali 'gnome-tweak-tool' kaj rehavi ĝin, same kiel en Linux Mint (Cinnamon):
1) Tajpu en terminalo (Ctrl-Alt-T):
sudo apt install gnome-tweak-tool gnome-tweak-tool
2) Elektu 'Typing' (tajpado, la 2a vico plej supre) kaj
3) Ŝanĝu 'Adding Esperanto Supersigned Letters' al 'To the corresponding key in a QUERTY layoyt'
4) Nun eblas skribi
- ĉ per AltGr-c
- Ĉ per Shift-AltGr-C
- ŝ per AltGr-s
- Ŝ per Shift-AltGr-S
- ĵ per AltGr-j
- Ĵ per Shift-AltGr-J
kaj tiel plu
This means by pressing the set compose key (e.g. right Windows key), followed by more or less intuitive keystrokes you enter various Unicode symbols, e.g.:
- ^, h for ĥ (and analogously for ĉ, Ĝ, ĵ, Ŝ)
- U, U for Ŭ
- u, u for ŭ
- ', i for í
- ,, C for Ç
- <, < for «
- ,, , for „
- ', ' for ”
- <, 3 for ♥
Se vi uzas Gnome (ekzemple per Fedora) vi povas uzi la x-sistemon sen instali ion ajn se vi ŝaltas ĝin per la agordoj. La x-sistemo permesas ekzemple tajpi “ehxosxangxocxiujxauxde” por ke aperu “eĥoŝanĝoĉiuĵaŭde”.
- Puŝu la vindozan klavon por malfermi la serĉilon kaj serĉu “lingvo”.
- Elektu “lando kaj lingvo”
- Klaku la butonon “+” por aldoni plian enigmetodon.
- Klaku sur la punktoj ĉe la subo por serĉi pliajn lingvojn
- Elektu “aliaj” por malfermi la serĉilon
- Tajpu “esperanto” en la serĉilo
- Klaku sur “esperanto (x-sistemo)”
- Nun devus esti du enigmetodoj en via komputilo.
- Vi povas elekti inter la du per la menuo ĉe la supra dekstro de la ekrano.
- Alternative vi povas ŝanĝi inter la du puŝante la vindozan klavon kaj la spaceton samtempe.
I have a German keyboard with deadkeys (no personal configurations). Using the
^ key, I can produce the following ĉapelitaj literoj: âĉêĝĥîĵôŝûŵŷẑ.
The breve is quite hidden, I have to press
# to get it. I can produce the following letters with breve: ăĕğĭŏŭ.
The deadkeys feature can also be used on the US international keyboard layout
It should be noted, too, that one can easily extend the Compose mechanism. Here's my
~/.XCompose with a shortcut I find particularly practical (I just double tap the corresponding letter):
<Multi_key> <c> <c> : "ĉ" ccircumflex <Multi_key> <g> <g> : "ĝ" gcircumflex <Multi_key> <h> <h> : "ĥ" hcircumflex <Multi_key> <j> <j> : "ĵ" jcircumflex <Multi_key> <s> <s> : "ŝ" scircumflex <Multi_key> <u> <u> : "ŭ" ubreve <Multi_key> <C> <C> : "Ĉ" Ccircumflex <Multi_key> <G> <G> : "Ĝ" Gcircumflex <Multi_key> <H> <H> : "Ĥ" Hcircumflex <Multi_key> <J> <J> : "Ĵ" Jcircumflex <Multi_key> <S> <S> : "Ŝ" Scircumflex <Multi_key> <U> <U> : "Ŭ" Ubreve
Another natural choice, of course, would be
<c> <x> (or
<c> <h>) etc. One can also put in all the possible styles that may be preferable under different conditions, it doesn't do any harm to have redundant combinations for the same result.
In Gnome one has to disable the default input method because that ignores this file (and any other text files indeed, the mappings are hardcoded in it). This is done via:
gsettings set org.gnome.settings-daemon.plugins.keyboard active false imsettings-switch UIM
after installing the appropriate packages (
uim-gtk3 on Fedora Linux). The link above gives instructions for Ubuntu.
If there are other Emacs users here, I have an Emacs input method based on the TeX input method that maps ^ and ~ as prefixes for c, g, h, j, s, and u. I'm more than willing to share it if anyone else wants to give it a try. I installed Emacs 25.1 this weekend, and it only took me a minute to put it into the latest version. If there are at least a few people who actually want it, I'll see about submitting it for the next release of Emacs.
I use the polish layout of keyboard and there are some "dead" symbols. https://www.youtube.com/watch?v=ES4HqXZdAJA
But you do not need change your national layout. You can change Xmodmap settings. Ex:
xmodmap -pke > ~/.Xmodmap vim ~/.Xmodmap
and change line with key ex.
keycode 48 = apostrophe quotedbl apostrophe quotedbl dead_circumflex dead_caron
It should work.
PS. also you can try to find "dead_circumflex", "dead_caron". Maybe are already there.
However, if you want an HTML program that requires no installation: https://github.com/alkanadi/E-Hats
The most efficient way is to use Mode_switch. I wrote about it here.
For a keyboard layout that doesn't use dead-keys (as Italian (Winkeys)), in Linux Lite, which uses XFCE as Desktop Manager, I had to enable the Compose key in Settings > Keyboard.
(I had to first deselect Use system defaults or it won't let me change the Compose key, set to none by default.)
After I did that, I was able to write Ĝ by pressing (and immediately releasing) the Compose key, ^, and G. With Compose key, b, and a (or Compose key, u, and a), I was able to obtain ă.