From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: kbd vs read-key-sequence Date: Fri, 02 Mar 2007 11:47:46 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1172854104 18536 80.91.229.12 (2 Mar 2007 16:48:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Mar 2007 16:48:24 +0000 (UTC) Cc: Emacs Devel To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 02 17:48:16 2007 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 1HNAvY-0002PD-FJ for ged-emacs-devel@m.gmane.org; Fri, 02 Mar 2007 17:48:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNAvX-0000jI-N7 for ged-emacs-devel@m.gmane.org; Fri, 02 Mar 2007 11:48:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HNAvK-0000jA-Cm for emacs-devel@gnu.org; Fri, 02 Mar 2007 11:48:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HNAvI-0000iy-VQ for emacs-devel@gnu.org; Fri, 02 Mar 2007 11:48:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNAvI-0000iv-PW for emacs-devel@gnu.org; Fri, 02 Mar 2007 11:48:00 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HNAvI-0003IC-8s for emacs-devel@gnu.org; Fri, 02 Mar 2007 11:48:00 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id CCB102CF21C; Fri, 2 Mar 2007 11:47:59 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 714533FE0; Fri, 2 Mar 2007 11:47:46 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 54ABA6C805; Fri, 2 Mar 2007 11:47:46 -0500 (EST) In-Reply-To: (Juanma Barranquero's message of "Fri\, 2 Mar 2007 00\:53\:31 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: Linux 2.6 (newer, 3) 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:67228 Archived-At: >> Hmm... so I'm still wondering why does read-key-sequence return 186 as w= ell? >> What does M-: (keyboard-coding-system) say? > cp1252 >> What does M-: (char-to-string 186) say? > "\272" >> What does the following piece of code say: > [2234] > And this is weird: > read-char read-key-sequence > =BA 186 2234 > S-=BA 170 2218 Oh, so I misunderstood the original report: read-key-sequence does not return 186, but 2234, i.e. it's working correctly. > C-=BA 67109050 67109050 > C-S-=BA 67109034 67109034 > M-=BA 134217914 134217914 > S-M-=BA 134217898 134217898 > C-M-=BA 201326778 201326778 > C-S-M-=BA 201326762 201326762 OK, now I understand. The fix for it is to change w32 so that it does the decoding earlier, as is done in X, rather than via encoded-kb. I believe that changing encoded-kb to do the decoding on events-with-modifiers is a bit tricky because it's not always desirable IIRC. Stefan