20

What methods or programs are available for typing the characters with accents on Linux?

15 Answers 15

19

There are at least three methods that I know of (I am using XUbuntu 15.10):

  1. 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).

  2. 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.
  3. 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.

  • Ad 1: Whether you also have US International installed has nothing to do with whether AltGr works (or what it does). Most major keyboard layouts use AltGr in one way or another, of course with the important exception of the standard US layout. But even the standard British layout uses AltGr. – Hans Adler Aug 30 '16 at 7:18
  • 1
    I wrote that just because I wasn't really sure AltGr is needed (I haven't tested). The Bulgarian layout, for example, does not require AltGr for anything and it does not do anything, but if you have US International (and not just US) then the AltGr magically starts working and allowing the typing of some old cyrillic letters like ѣ, ѫ and ѭ, and other interesting things. – Lyubomir Vasilev Aug 30 '16 at 7:56
  • 1
    I use method two with a chromebox, so it works for chromos as well. – conor Aug 30 '16 at 8:00
  • @LyubomirVasilev: Wow, that's really weird. I would think it's a bug in the Bulgarian layout, though - something is underspecified, so it keeps the value from the previous layout. – Hans Adler Aug 30 '16 at 8:10
  • @HansAdler Most likely. I should probably try to fix it… :) – Lyubomir Vasilev Aug 30 '16 at 8:27
10

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 AltGr C to type ĉ and AltGr Shift C to type Ĉ and so on.

Be aware: with enabled "extra typographic characters" this won't work.

Linux Mint - Keyboard Layout Options

  • This works for Cinnamon and Mate, right? – Lyubomir Vasilev Aug 30 '16 at 9:41
  • I can only confirm for one DE: Cinnamon. – LaStranga Aug 30 '16 at 10:09
  • Linux Mint the best :D – benahm Aug 30 '16 at 10:12
  • It also works on Ubuntu. You have to install gnome-tweak-tool to access the setting – Jacob Nordfalk Aug 31 '16 at 11:42
9

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'

enter image description here

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 works for Unity too, if you go into Settings > Text Entry > Keyboard Settings and set Alternative Characters Key to Right Alt. – Josh Sep 15 '16 at 7:07
8

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”.

  1. Puŝu la vindozan klavon por malfermi la serĉilon kaj serĉu “lingvo”.
  2. Elektu “lando kaj lingvo”

Lingvo kaj lando

  1. Klaku la butonon “+” por aldoni plian enigmetodon.

enter image description here

  1. Klaku sur la punktoj ĉe la subo por serĉi pliajn lingvojn

enter image description here

  1. Elektu “aliaj” por malfermi la serĉilon

enter image description here

  1. Tajpu “esperanto” en la serĉilo
  2. Klaku sur “esperanto (x-sistemo)”

enter image description here

  1. Nun devus esti du enigmetodoj en via komputilo.
  2. Vi povas elekti inter la du per la menuo ĉe la supra dekstro de la ekrano.

enter image description here

  1. Alternative vi povas ŝanĝi inter la du puŝante la vindozan klavon kaj la spaceton samtempe.

enter image description here

  • Dankon, interese, sed mi ne trovas "esperanto (x-sistemo)" – nealmcb Aug 27 '18 at 16:07
6

In usual Linux distros this works right out of the box. You just go to the keyboard settings and tick something like "Use Esperanto accents." Then you have them like RightAlt-G -> "ĝ".

  • In which graphical environment is that? I don't have such an option in Xfce. – Lyubomir Vasilev Aug 30 '16 at 6:48
  • I think thay are called "supersigned" – user84976 Aug 30 '16 at 8:27
  • 2
    This works in Gnome (e.g. Ubuntu) and Cinnamon (e.g. Linux Mint). – Marcos Cramer Aug 30 '16 at 9:09
6

You can also use the Compose key (how to activate that depends on your system). To quote my Windows answer:

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 ♥
  • In Ubuntu: > * <kbd>,</kbd>, <kbd>,</kbd> for ¸ > * <kbd>'</kbd>, <kbd>'</kbd> for ´ > * <kbd>,</kbd>, <kbd>"</kbd> for „ > * <kbd>></kbd>, <kbd>"</kbd> for ” > * <kbd><</kbd>, <kbd>"</kbd> for “ In UbuntuMATE something like System/Parameters/Hardware/Keyboard from the menu, then Layout/Parameters/Compose-key location and chose the option you prefer (I do not know English names of this commands). – BartekChom Sep 29 '16 at 14:34
5

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 AltGr Shift # to get it. I can produce the following letters with breve: ăĕğĭŏŭ.

The deadkeys feature can also be used on the US international keyboard layout

  • I use the same method to type the accented letters. I always asked myself whether one can re-map AltGr + Shift + # to a more suitable key combination? – Aviadisto Aug 30 '16 at 12:30
  • Almost the same for those who use Brazilian keyboard. But for the breve we type `altgr-shift-`, as showed here. – Marco Aug 30 '16 at 15:41
  • @Marco # and ' happen to sit on the same key in the German keybord, # is unshifted and ' is shifted. – jknappen Dec 15 '18 at 22:33
4

An option not mentioned yet in other answers: you can use the x-system as an input method using Ibus with the m17n Esperanto input methods. In Ubuntu this means you need to have ibus, ibus-m17n and m17n-contrib installed.

  • How does this work? After following lots of broken/stolen links and bypassing unhelpful READMEs I found documentation on m17n itself at nongnu.org/m17n but that doesn't talk about ibus integration. – nealmcb Aug 27 '18 at 16:02
4

I am using Debian with KDE and I configure a new keyboard layout, so when I have to switch and write in esperanto I simple use Alt+L to change the layout from mine (English with Italian accents).

3

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.

  • Btw. I hate switching keyboard layouts because with that method I'd need 3 or 4 different ones. Just too often I need to type things like ř, { }, ∞, |ψ〉, ≠, ±, ⇒, °, #, Γ, €... so I just squeezed everything into a standard 105 and some into Compose :-) – La Vo-o Oct 22 '16 at 23:38
2

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.

  • 1
    This is exactly what the builtin input method "esperanto-prefix" is doing ... i prefer esperanto-postfix,though. – Vera Johanna Dec 1 '16 at 22:08
1

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

And run:

xmodmap ~/.Xmodmap

It should work.

PS. also you can try to find "dead_circumflex", "dead_caron". Maybe are already there.

1

enter image description hereLinux has it built in, so you just add the keyboard. You can go to Settings --> Test Entry and then click the plus button to add additional keyboard. This image is from Ubuntu.

However, if you want an HTML program that requires no installation: https://github.com/alkanadi/E-Hats

0

in Unity in Ubuntu 14 — 17 removed option is accessible via gnome-tweak-tool — just sudo apt install gnome-tweak-tool first

0

The most efficient way is to use Mode_switch. I wrote about it here.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.