#StackBounty: #xorg Why can't I type a g̃?

Bounty: 100

My language, Guarani, uses G̃/g̃ to denote the nasalized velar approximant. I thought I’d be able to type it by combining a dead tilde with g, but this does not work. Why doesn’t it, and how can I fix it?

My main suspicion is that this has to do with the fact that there is no separate unicode character for g̃, just g with the combining tilde. I can type ỹ and ṽ just fine, but not j̃, r̃, m̃, which seems like good evidence that therein lies the problem.

So one way I could get around this would be to map a key to 0x1000303 (which is U+0303, or ◌̃ ), the combining tilde, instead of to dead_tilde. However, this creates several problems:

  • If I switch to using the combining tilde in all cases:
    • I end up typing e.g. n + ◌̃ in many cases where the single character ñ is expected, and they have different results. For example, I’ve noticed that certain websites won’t display the same search results if I type one vs. the other (obviously that’s on them, but I want a keyboard layout that works with the world as it exists now).
    • It’s annoying that I have to backspace twice to delete characters with the combining tilde, which I can accept if it’s only for the g̃, but it’s a little much with every nasalized character.
  • If I add both, which is what I’m currently doing, this becomes really hard for usability, because:
    • I have to think in each case about which key to use, when my brain thinks of them as the same
    • The mechanics of typing the two are different, since dead_tilde is pressed before a character, whereas ◌̃ goes after. My poor little brain will never get used to that.

It seems like in the ideal scenario I’d have X notice that dead_tilde + g doesn’t work and just process it as if I’m typing g + ◌̃, and enter the two characters for me together, as it does for ñ, ã, ẽ, ĩ, õ, ũ, ỹ, etc.

It’s worth noting that it’s not possible to get around this by adding the g̃ directly to my keyboard layout, as xkb doesn’t seem to support mapping a key to a combined unicode glyph (though see the answer to Custom xkb layout in which one key creates two unicode code points for a hacky workaround). If I could fix that, I suppose this would be much less of a problem.

I’m running Ubuntu 18.04, not sure what other background info would be helpful, but I assume this is a problem for anyone running X.

Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.