Cedilla with ‘ and c (dead key) for QT apps

input-languageskdekeyboard-layoutqtxorg

As a Brazilian, I want my american keyboard to use dead keys and to map cedilla (ç) to ' + c. The default mapping gives me ć. For GTK-based applications, this setup can be easily achieved by setting the following environment variable:

GTK_IM_MODULES=cedilla

However, for Qt-based applications (like KWrite), the same method doesn't work:

QT_IM_MODULES=cedilla #doesn't work!

The Qt applications will continue to print ć. How do I debug and fix this?

Note: please, do not suggest the approach given here. Typing AltGr + c feels very alien to a Brazilian and the GTK solution works just fine.

Best Answer

Creating a file ~/.XCompose with the following content should do the trick:

include "%S/en_US.UTF-8/Compose"
<dead_acute> <C>                        : "Ç"
<dead_acute> <c>                        : "ç"

However, this is working only if the application is reading the XCompose files (/usr/share/X11/locale/...). This is no X server setting but really depends on the application, see Gilles answer on UNIX.SE for a method to find out if an application is reading these files.

Related Question