14

I am running Lubuntu on my laptop and would like to write French accents with a US keyboard. I find the compose key solution ([Alt]+[accent] at the same time, followed by a [letter]) not that handy...

On Windows, there is a better solution: switch the keyboard layout to US-international and then type [`] followed by [a] to display [à]. Still on Windows, the software EasyType makes it even easier: press once [e] to get [e], twice [e] to get [é], three times [e] to get [è]...

Is there a way to achieve that on lubuntu? With a script or something?

PS: My keyboard is Vietnamese, but exactly corresponds to the US keyboard.

dessert
  • 39,982
rom
  • 341
  • 1
    I don't feel this is a duplicate, but a specific question. To Windows users familiar with International Keyboard, you want it to work as the OP describes: type [`] followed by [a] to display [à] – Fuhrmanator Sep 22 '14 at 20:13
  • 1
    In Ubuntu 14.04 it's System Settings > Keyboard > Text Entry > + (Add Input source) > English (US, international with dead keys). It's not perfect, however. Trying to do a C - cedilla is not the same, but yields ć. The other accents é ê è ë in French seem to work OK. – Fuhrmanator Sep 22 '14 at 20:20
  • 1
    For the cedilla problem, see this answer http://askubuntu.com/a/428619/148933 – Fuhrmanator Sep 22 '14 at 20:25

1 Answers1

27

Use the keyboard layout called English (international with Alt Gr dead keys). (Do this by going to System Settings > Keyboard > Layout settings, and then add the layout you want with the + button on the bottom.)

This way, the keys to input the characters ', ", `, ~, and ^ become "dead keys" while you hold pressed Alt Gr. After releasing the key combination with Alt Gr, no characters will be print (hence "dead"), but inserting a letter afterwards will yield a variation of the base character of the letter, in accordance with the dead key you pressed before; for example, é, ë, è, , and ê for e (respectively). (If you have no explicit Alt Gr key, just use the rightmost Alt key.)

So in summary, to insert a symbol

  1. press and hold Alt Gr,
  2. press the modifier key / key combination; e.g., `,
  3. release all keys pressed so far, and
  4. press the base character key; e.g., E for è.

Note: You can also enter an acute accented vowel by just pressing Alt Gr + (vowel).

(Source: this post on french Ubuntu forums.)

Severo Raz
  • 5,971
  • Actually the layout English (international AltGr dead keys) doesn't work for me. If I press [AltGr] and [`] and [e], I get [é] instead of [è]. – rom Aug 16 '13 at 06:55
  • Could it be because my keyboard is Vietnamese? (but corresponds to the US one) – rom Aug 16 '13 at 07:04
  • I updated the description because it was a bit lousy. Now, I suspect you are pressing all keys at once, are you not? Press simultaneously only Alt Gr and the "dead key", release, and then insert a letter. (I have now described this in my answer.) Are you still unsuccessful? – Severo Raz Aug 16 '13 at 07:56
  • I have tried again following your instructions. Still not working. If I press [Alt]+[`] at the same time, then release the keys (no output), then press [e], I just got [e]. I have tried with the two Alt and other accents. – rom Aug 16 '13 at 09:13
  • In Preferences->Lxkeymap->Tools->Show/Hide profiles->Options, I have "Compose key composition". If I assign it to the right Alt, it's like discarding the dead keys: Alt+->! What's wrong with my keyboard??!! – rom Aug 16 '13 at 11:22
  • What is Lxkeymap? It looks like you're using different (non-default) software, am I wrong? – Severo Raz Aug 16 '13 at 16:42
  • Lxkeymap is the default software for keyboard layout in Lubuntu. – rom Aug 17 '13 at 01:54
  • You are confused, lxkeymap is software for switching keyboard layouts. You are navigating to the wrong menu from System Preferences. Confirm you have an item among your preferences named "Keyboard", or the like in your language. – Severo Raz Aug 19 '13 at 22:38
  • Are you sure? In Preferences-> Keyboard and mouse-> Keyboard tab: I have "Keyboard Layout". There is a button... It redirects to lxkeymap. Is it what you're asking? – rom Aug 22 '13 at 01:47
  • What version of Ubuntu are you using? Your preferences menu seems very different to mine, are you not using Ubuntu 13.04? – Severo Raz Aug 22 '13 at 02:57
  • I am using Lubuntu (13.04), not Ubuntu! – rom Aug 22 '13 at 03:50
  • Sorry, I did not know keyboard software varied from Ubuntu to Lubuntu. I am not able to answer your question then. – Severo Raz Aug 22 '13 at 04:27
  • 5
    I stumbled on this question looking for something else. The AltGr with dead keys is a pain to use (at least for fast typers). I think that a better option is the 'US internation with dead keys' (no AltGr in the description). There you just type the accent and the letter. For instance type ' (no alt, no ctrl, no nothing) followed by e and you have é. – rpsml May 02 '14 at 15:43
  • Well they're very similar; both require two key presses to output a special letter. However, using AltGr dead keys makes you do it at the same time (which could be faster if your fingers are agile enough). – Severo Raz May 02 '14 at 19:22
  • @rpsml What you say is a fallacy. These layout simply implement a different strategy. intl makes every key like ' a dead key right away, i.e. you can type 'e for é but at the cost of having to type quote+space now for a literal quote. altgr-intl leaves all special characters as normal keys but makes them modifiable by AltGr for the same purpose. No layout is strictly better than the other for fast general typing (meaning encompassing all possible character combinations) ==> END BELOW – Atralb Jun 16 '20 at 10:56
  • @rpsml And to be honest, the AltGr one is actually far better for most of us here, since it doesn't require you to type 2 characters for each one of these special characters that are needed everywhere in code, and it is a clearly better fit for those who type in english most of the time but need to type international characters from time to time (who doesn't use quotes and double quotes even when not coding). If you find yourself needing those a lot, then it most likely mean the US keyboard isn't right for you instead. – Atralb Jun 16 '20 at 10:59
  • @Atralb My native language is Portuguese. My everyday language is French. My working language is English. Throughout the day I switch among these three several times. The AltGr version has a few problems. First, a conceptual one: diacritics are modifiers of a letter, not a new letter in the alphabet. For me it makes sense to always type 'a' if I want an 'a' with some accent not Alt-a for "á", Alt-q for "ä" and Alt-w for å. Second, I could not find all necessary diacritics such as "à" (important in French and Portuguese), and "ã" (very important in Portuguese) [MORE BELOW]. – rpsml Jun 16 '20 at 18:27
  • @Atralb Third: an upper case letter is more cumbersome as you have to press 3 keys simultaneously . Why don't I switch keyboards (US, French and Portuguese). Well, they also change the placement of the letters (French is AZERTY, not QWERTY). It makes a mess in your head. But in the end, the choice is the one that makes you happy. I do now own the truth. The international US with dead keys is definitely the one that gives me the more agility throughout the day. My advice if you type in multiple languages: spend one week with each configuration and chose the best for you. – rpsml Jun 16 '20 at 18:33
  • @rpsml Well to each his own indeed. I won't dive further into the matter but just wanted to add a note since you seem mistaken : the altgr-intl (please always reference the unambiguous name of the layout for better understanding) variant does not make use of such Alt-a or Alt-w keybindings. The entire US keyboard stays exactly the same. The only change is that it activates the AltGr key (which is completely useless otherwise) to be able to do AltGr+' a for á, AltGr+\ aforà,AltGr+" aforä,AltGr+~ aforã`, etc... [MORE BELOW] – Atralb Jun 16 '20 at 18:52
  • @rpsml And it works on all the alphabet. (I wrote this characters with this layout). So as you can see, it has everything you could think of both in french and portuguese. And you always type the letter you want as with your layout. You are not thinking about the "AltGr with dead keys" layout. It reminds me more of the classic Azerty layout. (The space in the keybindings means you have to release the previous keys) – Atralb Jun 16 '20 at 18:59