When I use a keyboard, I expect the following behaviours (and I rely on these behaviours):
- Press ", release ": Should remember the key as a dead key
- Press ", release ", press <space>, release <space>: Should print
"
- Press ", release ", press ", release ": Should print
""
I understand that this behaviour is defined by a keyboard layout, so I did some research.
On keyboard layout "English - US with dead keys", I get the top 2 behaviours that I prefer, but the last behaviour is not fulfilled, and I get the weird character ¨
when I try that.
On keyboard layout "English - US with AltGr dead keys", I only get the last behaviour, but the key doesn't behave dead anymore.
How can I modify the keyboard layout to fulfill the 3 behaviours I expect when I use a keyboard?
After trying differend ways for this problem, I eventually found a solution with help in chat for this problem
The root cause of the problem is actually caused by the fact that Linux does not have an
dead_apostrophe
and adead_quotedbl
by default, so the default "us dead keyboard layout" have either mapped adead_acute
or a non dead key mapped to"
.This meant this problem is not being fixable by making your own custom keyboard layout, as I was suggested in the chat.
After further research and the just is time learning of new keywords to search, I found this solution on Unix & Linux StackExchange, what helped me solve the problem.
I followed the following steps listed in that answer:
sudo apt install uim
echo 'export GTK_IM_MODULE="uim"' >> ~/.profile
echo 'export QT_IM_MODULE="uim"' >> ~/.profile
curl 'https://gist.githubusercontent.com/guiambros/b773ee85746e06454596/raw/0ea6d7f7cf9a6ff38b4cafde24dd43852e46d5e3/.XCompose' > ~/.XCompose
After these steps, I managed to fulfill the following expectations I had about my keyboard: