From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: kbd vs read-key-sequence Date: Mon, 02 Apr 2007 11:27:41 +0900 Message-ID: References: <4610139D.3060909@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1175480883 32510 80.91.229.12 (2 Apr 2007 02:28:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2007 02:28:03 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org, monnier@iro.umontreal.ca, rms@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 02 04:27:56 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 1HYCGx-0000UD-Vv for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2007 04:27:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYCJw-0003hq-M7 for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 22:31:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYCJt-0003b9-KT for emacs-devel@gnu.org; Sun, 01 Apr 2007 22:30:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYCJs-0003VO-AB for emacs-devel@gnu.org; Sun, 01 Apr 2007 22:30:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYCJs-0003VC-0g for emacs-devel@gnu.org; Sun, 01 Apr 2007 22:30:56 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HYCGp-0007vY-St; Sun, 01 Apr 2007 22:27:48 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id l322RgcD014714; Mon, 2 Apr 2007 11:27:43 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id l322Rgum015845; Mon, 2 Apr 2007 11:27:42 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id l322RfiG014320; Mon, 2 Apr 2007 11:27:41 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.63) (envelope-from ) id 1HYCGj-0001Dn-AH; Mon, 02 Apr 2007 11:27:41 +0900 In-reply-to: <4610139D.3060909@gnu.org> (message from Jason Rumney on Sun, 01 Apr 2007 21:18:37 +0100) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.95 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-detected-kernel: Solaris 8 (1) 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:68918 Archived-At: In article <4610139D.3060909@gnu.org>, Jason Rumney writes: > Stefan Monnier wrote: > > There's no indication that doing it right (i.e. doing the coding-system > > decoding somewhere in the w32 code which turns w32 events into elisp events) > > is difficult. AFAICT nobody has really tried to do it. > > > Anything to do with coding-systems in C code is difficult. Especially > when almost every encoding on Windows involves autoloaded CCL based > coding-systems. We don't have to use the mechanism of "decode-coding". Windows code is already using MultiByteToWideChar() which seems to convert codepage codes to Unicode character, right? 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])); And, in emacs-unicode-2, you don't have to call "decode-char". --- Kenichi Handa handa@m17n.org