Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1804  / 3 Years ago, tue, september 14, 2021, 7:05:07

I am using the IBUS input method to alternate between US-English (my actual keyboard layout) and googlepinyin. However, occasionally I need to write German umlauts as well (ß,ä, ü, ö). There is the compose-key sequence that I just used to type the sample umlauts, which works, but I find it rather inconvenient. Is there a way to configure for Apple-stype umlaut generation (on my mac: OPTION+u, release, then the character you want as umlaut, e.g. OPTION+u, release, a --> ä)? I find this more convenient. Of course I could just add a German keyboard layout to switch to, but that I would also find rather inconvenient.



I gooled extensively, and I found some pointers on how to make this work in general, but none those methods seem to work with ibus.



Any ideas?



Thanks a bunch!
Jan


More From » 14.04

 Answers
0

Well, all you need is to edit the keyboard layout and add a dead key for AltGr+U. Let’s start:



Well, if you use US keyboard layout you need two additional things: right-alt and the dead key.



Let's do this in steps:



1. Backup the current layout:



First of all, make a backup from the US layout, so open a terminal and type:



cd /usr/share/X11/xkb/symbols



sudo cp us us.bkp



2. Open the layout file for editing:



Enter in the same terminal:



sudo gedit us



You can see lines like this:



default
partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {

name[Group1]= "USA";

// Alphanumeric section
key <TLDE> { [ grave, asciitilde ] };



Now you can make changes in the basic block which begins on the 3rd line here.



3. Enable right-alt or AltGr:



Add the line include "level3(ralt_switch)" which makes something like this:



    xkb_symbols "basic" {

include "level3(ralt_switch)"

name[Group1]= "USA";


4. Add the dead-key:



Find the following line:



    key <AD07> {    [     u,    U       ]   };


and change it to something like this:



    key <AD07> {    [     u,    U,     dead_diaeresis       ]   };

(be careful about the *comma* after the capital U).


Now your layout is ready.



5. Save and close the file.



6. Make changes take effect:



Return to the terminal and run the following command:



sudo dpkg-reconfigure xkb-data



7. Log out!



Or if you have more than one layouts, just change the layout once.






Alternatively



you may want to insert additional characters just with a single right-alt hit, i.e. AltGr+U for Ü, AltGr+A for Ä, AltGr+O for Ö, and AltGr+S for ß. In this case, instead of adding the dead-key (step 4) you should:



4. Add characters to the 3rd level:



Add all characters one by one, like this:



key <AD07> {    [     u,    U,     udiaeresis,     Udiaeresis       ]   };
key <AD08> { [ i, I ] };
key <AD09> { [ o, O, odiaeresis, Odiaeresis ] };

key <AC01> { [ a, A, adiaeresis, Adiaeresis ] };
key <AC02> { [ s, S, ssharp ] };


Again, be careful about commas and the capitals – they are necessary.



All the rest is the same.


[#24426] Thursday, September 16, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
thellfi

Total Points: 222
Total Questions: 103
Total Answers: 123

Location: Palau
Member since Mon, Aug 16, 2021
3 Years ago
;