unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: system-wide input methods and unmodified keys
Date: Thu, 26 Jun 2014 09:08:06 -0700	[thread overview]
Message-ID: <87wqc3d57d.fsf@ericabrahamsen.net> (raw)

I'm using the FCITX system-wide input method (for Chinese) as I like
having the same input method in all applications. I'm using Emacs trunk,
and this IM works well with the usual env variables set:

export GTK_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=fcitx

and emacs started as "LC_CTYPE=zh_CN.UTF-8 /usr/local/bin/emacs"

I'm using StumpWM on plain X, no window manager.

The only problem when using emacs is that any unmodified key stroke goes
to the IM, not to emacs. Fine when you're typing, but highly annoying in
special modes like Dired where unmodified keys call commands other than
`self-insert-command', or in key-prefix combos like "C-x o", where emacs
gets the "C-x" and the IM gets the "o".

Ideally, the IM would only ever handle keypresses that would eventually
call `self-insert-command' in emacs. I have no idea how this works,
however -- I don't know which application "comes first" in receiving
keypresses, and whether emacs could conceivably intercept these
unmodified keys and prevent the IM from reading them. I imagine if the
IM comes first, then there's no hope.

Does anyone know more about the interaction between emacs and system
IMs? Is there any chance of getting what I want?

Thanks!
Eric




             reply	other threads:[~2014-06-26 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 16:08 Eric Abrahamsen [this message]
     [not found] <mailman.4359.1403798925.1147.help-gnu-emacs@gnu.org>
2014-06-26 17:05 ` system-wide input methods and unmodified keys Stefan Monnier
2014-06-26 17:28   ` Eric Abrahamsen
2014-06-27  2:24     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqc3d57d.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).