From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: kbd vs read-key-sequence Date: Mon, 02 Apr 2007 14:58:40 +0300 Message-ID: References: <4610139D.3060909@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1175515170 12428 80.91.229.12 (2 Apr 2007 11:59:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2007 11:59:30 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, rms@gnu.org, jasonr@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 02 13:59:27 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 1HYLC2-0002T5-Fc for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2007 13:59:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYLF3-0000SX-Th for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2007 08:02:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYLET-0008Qv-FK for emacs-devel@gnu.org; Mon, 02 Apr 2007 08:01:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYLER-0008PT-NO for emacs-devel@gnu.org; Mon, 02 Apr 2007 08:01:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYLER-0008P4-0M for emacs-devel@gnu.org; Mon, 02 Apr 2007 08:01:55 -0400 Original-Received: from nitzan.inter.net.il ([213.8.233.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HYLBM-0000tU-BU; Mon, 02 Apr 2007 07:58:44 -0400 Original-Received: from HOME-C4E4A596F7 ([81.5.34.87]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id GKX84590 (AUTH halo1); Mon, 2 Apr 2007 14:58:38 +0300 (IDT) In-reply-to: (message from Kenichi Handa on Mon, 02 Apr 2007 11:27:41 +0900) X-detected-kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) 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:68927 Archived-At: > From: Kenichi Handa > CC: monnier@iro.umontreal.ca, rms@gnu.org, eliz@gnu.org, emacs-devel@gnu.org > Date: Mon, 02 Apr 2007 11:27:41 +0900 > > Windows code is already using MultiByteToWideChar() which > seems to convert codepage codes to Unicode character, right? Not to Unicode, to UTF-16. > Then, can't we use it to get a Unicode character code from > keyevent(s) and do something like this? > > MultiByteToWideChar (codepage, 0, inbuf, inlen, outbuf, outlen) > lisp_char = call2 (intern ("decode-char"), intern ("ucs"), > make_number (outbuf[0])); I don't think this is the right way of getting Unicode codepoints for keyboard input on Windows; see http://msdn2.microsoft.com/en-us/library/ms646267.aspx (under "Nonsystem Character Messages"), and http://msdn2.microsoft.com/en-us/library/ms633586.aspx for the gory details. But surely, such a drastic change in the w32 keyboard input processing is not something to consider before the release! Especially when the problems we are trying to fix are so minor, almost invisible.