After setxkbmap fr, dead keys do not work under konsole and yakuake (typing the dead key ^ immediately prints a ^, rather than wait for the next character), while they work in xterm. The font I'm using supports them, and it is possible to input them e.g. in vim using digraphs. Looking for a fix, thanks.

  • Could be this bug, or just some similar symptoms. Does anything on this page help? What version of KDE are you using, under which distribution? – Gilles 'SO- stop being evil' Jan 1 '15 at 22:07
  • I don't think it's the same bug: even if I setxkbmap fr and try immediately on a new konsole instance, this fails. Not sure how your other link can help, I do not intend to use the compose key and don't see anything about dead keys in the advanced keyboard settings. This is with KDE 4.14.3 under Arch. – antony Jan 2 '15 at 0:14
  • The internal mechanisms for dead keys are very similar to those for a Compose key (sequences of keypresses that start with Compose or with dead_xxx are translated to a single character), so it's worth trying. – Gilles 'SO- stop being evil' Jan 2 '15 at 0:32

Had that problem too (with a French keyboard). I found no solution to it with the default input method installed by KDE (XIM) - and I'm not enough of a system wizard to tweak it -, but I found a workaround by using another input method : ibus.

Here's what worked for me:

  1. Install im-config, a package that allows you to change the system input method :

    apt-get install im-config zenity
  2. Install ibus and qt-config (libpinyin also allows you to get a method for entering Chinese characters using a pinyin transliteration - for those who are interested - that's what the two last packages in this line are for) :

    apt-get install ibus ibus-qt4 qt4-qtconfig ibus-libpinyin libpinyin-utils
  3. Set the base parameters of ibus (e.g. your national keyboard) :

  4. Tell the system that ibus should be the default input method in software using the Qt graphic library (that is, all native KDE applications like Konsole, etc.):

  5. Use im-config to choose ibus as your default input method for all X11 applications:

  6. To make those changes recognized in every future X11 session, add these lines to your ~/.xsessionrc file (or create it if you don't have one yet):

    export GTK_IM_MODULE=ibus
    export XMODIFIERS=@im=ibus
    export QT_IM_MODULE=ibus
    ibus-daemon -drx
  7. In my case (it might not be yours), because I'm using tcsh and not bash as the default shell in my Konsole sessions, and because for whichever reason X11 failed to read .xsessionrc at every new startup, I also had to add this line to the .tcshrc shell startup file:

    sh $HOME/.xsessionrc
  8. Finally, in the IBus panel (that should now appear in the system tray), in the "Preferences" panel, "Advanced" tab, be sure to check the box "Use system keyboard layout", so that the keyboard layout used corresponds to what you have already chosen (and so that any additional options, e.g. position of the Compose Key, is taken into account).

Don't know why there was no simpler solution, and why the default input method does not take the dead keys mechanism into account (I checked in xev: the events were correctly sent by X11 to XIM, but Qt applications just ignored it!). Well anyway, I'm happy with the workaround.

  • 1
    Thanks for the detailed solution. However, I switched a while ago to using XKB (wiki.archlinux.org/index.php/X_KeyBoard_extension) and it works fine with me, so I cannot easily check that your proposed solution works. If anyone else confirms that it works, I will happily accept it. – antony Aug 15 '17 at 11:40
  • 1
    Hey Antony, I am having the same problem with debian+kde, dead keys are working in Firefox and other non kde program but not in yakuake/kontact, etc... Could you answer your own response explaining what you did exactly to "switch to XKB?". – Simon C. Feb 5 at 7:34
  • This answer could give a hint too: askubuntu.com/questions/619815/… – Philippe Gachoud Oct 8 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.