Like most french users, when I want to go to my terminal home, I have to type
cd ~
However, the keyboard requires me to press options + n
and then space
to disambiguate between me trying to do ñ
or ~
for example.
Is there a way to overload this behavior, as I almost never want to use the tilde symbol the way spanish people does ?
Karabiner looked promising but it won't let you define custom mapping. It requires you to chose between a set of predefined ones, online.
Ukelele can create a keyboard variation where tilde ~ is not a dead key, probably your best bet if you can get it to launch without hanging. You can always type ñ by holding down the n key for a second. Karabiner-Elements, AppleScript, etc. can only type what your keyboard supports, e.g., these bash commands with Karabiner:
Now the "AZERTY tilde" rule is installed.
Pick this Karabiner-Elements menu sequence to enable the "AZERTY tilde" rule:
Window > Karabiner-Elements Preferences > Complex Modifications > Rules > Add Rule
In the Add rule window, find "AZERTY tilde" on the left and use the corresponding ⊕ Enable button on the right. Now every dead-key tilde is followed by a space. The "AZERTY tilde" ⊕ Remove button disables it. Tested in Emacs with ns-option-modifier set to none, FireFox, iTerm and Terminal.