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: Thu, 01 Mar 2007 10:32:20 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172763168 16510 80.91.229.12 (1 Mar 2007 15:32:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Mar 2007 15:32:48 +0000 (UTC) Cc: Emacs Devel To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 01 16:32:39 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 1HMnGn-0003SO-D7 for ged-emacs-devel@m.gmane.org; Thu, 01 Mar 2007 16:32:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMnGp-0007NN-4i for ged-emacs-devel@m.gmane.org; Thu, 01 Mar 2007 10:32:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HMnGc-0007NA-SP for emacs-devel@gnu.org; Thu, 01 Mar 2007 10:32:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HMnGb-0007My-DG for emacs-devel@gnu.org; Thu, 01 Mar 2007 10:32:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMnGb-0007Mv-79 for emacs-devel@gnu.org; Thu, 01 Mar 2007 10:32:25 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HMnGa-0007Cm-Nn for emacs-devel@gnu.org; Thu, 01 Mar 2007 10:32:25 -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 6BAF22CF2A2; Thu, 1 Mar 2007 10:32:24 -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 01D733FE0; Thu, 1 Mar 2007 10:32:21 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id E44E96C805; Thu, 1 Mar 2007 10:32:20 -0500 (EST) In-Reply-To: (Juanma Barranquero's message of "Thu\, 1 Mar 2007 13\:48\:38 +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:67141 Archived-At: >> Looks like a bug in our w32 code, where we somehow fail to decode the chars >> before returning them from read-key-sequence. > I honestly cannot say whether it is a bug in the w32 code, or the > consequence of the complexity of input decoding (with > keyboard-translate-table, translation-table-for-input, > function-key-map, key-translation-map, coding systems and whatnot). > In any case: > ;; Kubuntu 6.10 > read-char / read-event => 2234 > (aref translation-table-for-input 2234) => 2234 > (lookup-key key-translation-map [186]) => nil > ;; Windows XP SP2 > read-char / read-event => 186 > (aref translation-table-for-input 2234) => nil > (lookup-key key-translation-map [186]) => encoded-kb-self-insert-ccl [ BTW, please always specify whether this is in "console mode" or not, because the way keys are translated can be different in each case. ] Hmm... so w32 does decoding using keyboard-coding-system (aka encoded-kb)? But then why does read-key-sequence return 186 as well? read-key-sequence should be using key-translation-map and hence turn it into 2234. What does keyboard-coding-system say? Stefan