From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Cloos Newsgroups: gmane.emacs.devel Subject: Re: Keybindings in non-Latin layout Date: Wed, 06 May 2009 08:19:37 -0400 Message-ID: References: <5f0660120905020830o4a21cc3v6932025bab16c76e@mail.gmail.com> <87ocuaqu3n.fsf@mail.jurta.org> <87ws8wtoa3.fsf@mail.jurta.org> <87ljpcjmr6.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1241614550 10653 80.91.229.12 (6 May 2009 12:55:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 May 2009 12:55:50 +0000 (UTC) Cc: Andrey Paramonov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 06 14:55:40 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M1gen-0007K6-FJ for ged-emacs-devel@m.gmane.org; Wed, 06 May 2009 14:55:29 +0200 Original-Received: from localhost ([127.0.0.1]:58200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1gem-00087X-Tx for ged-emacs-devel@m.gmane.org; Wed, 06 May 2009 08:55:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1gds-0007a2-OZ for emacs-devel@gnu.org; Wed, 06 May 2009 08:54:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1gdo-0007UW-04 for emacs-devel@gnu.org; Wed, 06 May 2009 08:54:31 -0400 Original-Received: from [199.232.76.173] (port=59013 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1gdn-0007U7-FL for emacs-devel@gnu.org; Wed, 06 May 2009 08:54:27 -0400 Original-Received: from eagle.jhcloos.com ([207.210.242.212]:2627) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M1g9m-0006td-Kf for emacs-devel@gnu.org; Wed, 06 May 2009 08:23:26 -0400 Original-Received: by eagle.jhcloos.com (Postfix, from userid 10) id BA56640084; Wed, 6 May 2009 12:22:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhcloos.com; s=eagle; t=1241612603; bh=HJhsQIW/kzYV0yQtdEnOpW/fG0ssa2OmuB06hv2DAsI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; b=BaqZcNoX4VgwUyVAtJp5MGeWV0qambrrjh0vEVJ2AWrXosXZLpgYQuhl4Y4z47ReB tOjrPksm+CPzbKEkveQyNzCas+QYVTGxeCPcXpk2Pi0b0qfA68fSNFFbv5twnMKd5s D4NIag//sPm0Nu+0h37SZ2bDnuL3G9gNpssKMDgc= Original-Received: by lugabout.jhcloos.org (Postfix, from userid 500) id 0CC216354B; Wed, 6 May 2009 12:20:02 +0000 (UTC) In-Reply-To: (Andrey Paramonov's message of "Tue, 5 May 2009 18:29:14 +0000 (UTC)") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.92 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAI1J REFUOE+lU9ESgCAIg64P1y+ngUdxhl5H8wFbbM0OmUiEhKkCYaZThXCo6KE5sCbA1DDX3genvO4d eBQgEMaM5qy6uWk4SfBYfdu9jvBN9nSVDOKRtwb+I3epboOsOX5pZbJNsBJFvmQQ05YMfieIBnYX FK2N6dOawd97r/e8RjkTLzmMsiVgrAoEugtviCM3v2WzjgAAAABJRU5ErkJggg== Copyright: Copyright 2009 James Cloos OpenPGP: ED7DAEA6; url=http://jhcloos.com/public_key/0xED7DAEA6.asc OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6 Original-Lines: 58 X-Hashcash: 1:29:090506:emacs-devel@gnu.org::csajvfB4eqxQOb30:000000000000000000000000000000000000000004UfNn X-Hashcash: 1:29:090506:cmr.pent@gmail.com::w4is0aql4MIxImp1:0000000000000000000000000000000000000000008833/ X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110719 Archived-At: >>>>> "Andrey" =3D=3D Andrey Paramonov writes: Andrey> I could however notice that it doesn't contain platform-specific Andrey> code. How come NTEmacs works nicely, while Emacs on my GNU/Linux Andrey> system doesn't? It is probably a function of how the key events are presented to emacs. On X, the key event struct=E2=80=99s .state member is a bitmask intended = to alter the meaning of the key event. The lower eight bits represent the eight modifiers (caps, shift, ctrl and five unnamed modifiers which are typicaly used for alt, meta, super, hyper, numlock). Bits 13 and 14 (0x2000 and 0x4000) specify which of the four possible groups are in play. Groups were initially indended for those cases where the keyboard has multiple columns of symbols, as seen on most European keyboards. (Here in the states, the most common case is the euro symbols on recent keyboards.) As few years ago the keyboard database project changed its use of groups. Now, the columns of symbols on the key caps are treated as additional rows, and one can configure up to four separate keyboard configs at a time, one per group. This is convenient, as it allows one to quickly switch between up to four keyboards, using only the keyboard itself. But it is not how XKB groups were intended to be used when XKB was invented. With the current keyboard configs, it is appropriate to ignore the group bits when the control, meta, super and/or hyper bits are set. Some apps already do. In Emacs, it is probably also reasonable to ignore the group bits in the middle of sequences intiated by prefix keys. Ignoring the group bits also might be the Right Thing To Do when the user selects an application-level alternate keyboard, such as by use of Emacs=E2=80=99 (set-input-method) or (toggle-input-method). NT probably uses a sufficiently different method of keyboard events that this problem does not occur; there is nothing for Emacs to work around. (BTW, the concept of groups comes from XKB; XKB uses this: #define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff)) #define XkbGroupForCoreState(s) (((s)>>13)&0x3) #define XkbIsLegalGroup(g) (((g)>=3D0)&&((g) OpenPGP: 1024D/ED7DAEA6