From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Keybindings in non-Latin layout Date: Tue, 05 May 2009 11:40:13 +0900 Message-ID: <87ljpcjmr6.fsf@catnip.gol.com> References: <5f0660120905020830o4a21cc3v6932025bab16c76e@mail.gmail.com> <87ocuaqu3n.fsf@mail.jurta.org> <87ws8wtoa3.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1241491248 20405 80.91.229.12 (5 May 2009 02:40:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 May 2009 02:40:48 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 05 04:40:39 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 1M1AaE-0007gv-BT for ged-emacs-devel@m.gmane.org; Tue, 05 May 2009 04:40:38 +0200 Original-Received: from localhost ([127.0.0.1]:51188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1AaD-0005XV-Fv for ged-emacs-devel@m.gmane.org; Mon, 04 May 2009 22:40:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1Aa8-0005X0-Ml for emacs-devel@gnu.org; Mon, 04 May 2009 22:40:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1Aa4-0005TK-4W for emacs-devel@gnu.org; Mon, 04 May 2009 22:40:32 -0400 Original-Received: from [199.232.76.173] (port=35384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1Aa4-0005TH-1q for emacs-devel@gnu.org; Mon, 04 May 2009 22:40:28 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:44294 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M1Aa3-0006me-LT for emacs-devel@gnu.org; Mon, 04 May 2009 22:40:27 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1M1Aa0-0005oN-1v for emacs-devel@gnu.org; Tue, 05 May 2009 02:40:24 +0000 Original-Received: from 218.231.212.123.eo.eaccess.ne.jp ([218.231.212.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 May 2009 02:40:24 +0000 Original-Received: from miles by 218.231.212.123.eo.eaccess.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 May 2009 02:40:24 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 218.231.212.123.eo.eaccess.ne.jp System-Type: x86_64-unknown-linux-gnu Cancel-Lock: sha1:fJMkR0TsT+230dzNfYvZftR6E9w= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:110663 Archived-At: Juri Linkov writes: > Now I see one way to fix this problem. What if we would define > a parallel branch in a keymap where every defined key sequence > has a copy translated according to a conversion table. > > So, for example, a define-key call: > > (define-key global-map [(control ?x) ?b] 'switch-to-buffer) > > would also define [(control ?ч) ?и] with the same binding > in the same keymap as if it were defined explicitly with: > > (define-key global-map [(control ?ч) ?и] 'switch-to-buffer) I think in general, a "reactive" solution, like function-key-map, or the special handling of shifted keys (mapping them to unshifted variants if not bound) would be much more robust than a method like the above (the problem being that it essentially stores redundant state that can get out of sync). -Miles -- `There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy.'