From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: system-wide input methods and unmodified keys Date: Thu, 26 Jun 2014 09:08:06 -0700 Message-ID: <87wqc3d57d.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1403798941 18123 80.91.229.3 (26 Jun 2014 16:09:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2014 16:09:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 26 18:08:55 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X0CEJ-0001xi-4Y for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jun 2014 18:08:55 +0200 Original-Received: from localhost ([::1]:45821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0CEI-0005Yo-Ik for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jun 2014 12:08:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0CDz-0005XJ-MU for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 12:08:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0CDm-00066K-M7 for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 12:08:35 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:60848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0CDm-00065Y-Do for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 12:08:22 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X0CDk-0001aV-Q6 for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 18:08:20 +0200 Original-Received: from c-76-28-195-250.hsd1.wa.comcast.net ([76.28.195.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Jun 2014 18:08:20 +0200 Original-Received: from eric by c-76-28-195-250.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Jun 2014 18:08:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-76-28-195-250.hsd1.wa.comcast.net User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:UrUyj8bEPJf9ITw2WDs4dzsw6CY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98417 Archived-At: 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