How to make system-wide shortcut to insert umlauts in Gnome?

3

3

I have a US layout keyboard and frequently need to insert German Umlaut characters. While on Windows, I used to have an AutoIt script that would e.g. insert ö to the currently selected input control if I pressed Ctrl+Alt+o.

Now, how would you do something like that in Gnome (Linux Mint 12)?

entity64

Posted 2011-12-16T13:07:29.297

Reputation: 201

Answers

5

In Gnome menu: System -> Preferences -> Keyboard. In Layout/Options, you can choose the "Compose Key Position" (I use right windows key, for instance). Once this compose key chosen, you can press compose-" o (compose and ", then o), et voilà, ö. It works for many others, such as compose-' e letter or compose-` e (french accents éè), or ²³⁴ (compose-^ number), etc. Hope that helps.

Ravachol

Posted 2011-12-16T13:07:29.297

Reputation: 1 190

In Gnome Shell (Gnome 3), this is in Tweak Tool > Typing > Position of Compose key. – 0__ – 2017-03-08T10:24:55.993

1Thanks for your answer, it kinda works. It isn't exactly what I was looking for though (I want these custom Ctrl+Alt+[o, a, u, s] shortcuts, I'm really used to them). – entity64 – 2011-12-16T14:06:13.500

1

You can use xmodmap to map keys in pretty much any way. For example, create a file ~/.Xmodmap with content keycode 66 = Mode_switch Multi_key keycode 39 = s S ssharp keycode 38 = a A adiaeresis Adiaeresis keycode 30 = u U udiaeresis Udiaeresis keycode 32 = o O odiaeresis Odiaeresis this makes key 66 (capslock on my keyboard) trigger the Umlauts. To use some other key, use xev to find the keycode. To activate these keys run xmodmap ~/.Xmodmap, which you might want to put e.g. into your ~/.xinitrc.

You can also use the more modern setxkbmap to mix keyboard layouts, see e.g. https://askubuntu.com/questions/967708/making-umlauts-in-ubuntu-17-10-on-a-thinkpad430 .

Echsecutor

Posted 2011-12-16T13:07:29.297

Reputation: 315