7

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
  • 215
  • 1
  • 3
  • 12
  • Dies the solution described in [this post](https://unix.stackexchange.com/questions/60884/how-to-make-compose-work-in-gtk-and-qt-apps/77473) work for you, to set `XMODIFIERS="@im=none"` to let X11 handle dead keys. See also this [Qt bug report](https://bugreports.qt.io/browse/QTCREATORBUG-9311). – harrymc Mar 17 '18 at 20:18
  • Unfortunately, no – ivarec Mar 17 '18 at 20:26

1 Answers1

8

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
  • 27,002
  • 7
  • 85
  • 97