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

5

1

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.

ivarec

Posted 2018-03-14T21:19:33.940

Reputation: 185

Dies the solution described in this post work for you, to set XMODIFIERS="@im=none" to let X11 handle dead keys. See also this Qt bug report.

– harrymc – 2018-03-17T20:18:20.603

Unfortunately, no – ivarec – 2018-03-17T20:26:23.890

Answers

6

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.

mpy

Posted 2018-03-14T21:19:33.940

Reputation: 20 866

Amazing! Since I'm not using Wayland, this is good enough for me. – ivarec – 2018-03-17T20:29:09.993