[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
system-wide input methods and unmodified keys
From: |
Eric Abrahamsen |
Subject: |
system-wide input methods and unmodified keys |
Date: |
Thu, 26 Jun 2014 09:08:06 -0700 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) |
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
- system-wide input methods and unmodified keys,
Eric Abrahamsen <=