Score:0

Set umlauts keyboard shortcuts with gsettings in Ubuntu 20.04

ye flag

I want to set umlauts keyboard shortcuts in ubuntu 20.04. I tried the following without success.

gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom/ name 'ä'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom/ command 'xdotool key adiaeresis'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom/ binding '<Alt>a'

If I try the command xdotool key adiaeresis in the terminal it results in the desired letter ä. Switchting the command to open a program the keyboard shortcuts works. I think the problem lies in the combination gsettings and xdotools.

Any help is very appreciated!

Thanks, Johannes!

Score:0
cn flag

While you are hitting Alt+a to trigger the shortcut key, xdotool at the same time sends the adiaeresis to the keyboard. The system sees Alt+a+ä, so that is something not recognized.

You will need to introduce a delay before xdotool presses the adiaeresis, a delay long enough for you to release your shortcut key. In case of xdotool, you could also experiment with keyup in order to have xdotool release Alt and a before you physically release these keys (and send these keyup signals again).

Note: "in case of xdotool": this option is not possible if using ydotool (which also works under Wayland), because ydotool simulates input from a second, independent keyboard.

Remark: using a keyboard layout with dead keys may be an easier and more reliable approach to enter characters with umlauts (and accents, etc) using a standard US keyboard.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.