From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Juanma Barranquero" <lekktu@gmail.com>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: Re: assertion failed: c == event->code
Date: Wed, 12 Dec 2007 15:05:16 -0500 [thread overview]
Message-ID: <jwvve73bryg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <f7ccd24b0712121000l79505381wc71bec5334f4d025@mail.gmail.com> (Juanma Barranquero's message of "Wed, 12 Dec 2007 19:00:05 +0100")
>> Basically, the issue is that when a key is pressed, the W32 code inserts
>> a "ASCII_KEYSTROKE_EVENT" in the queue, even for non-ASCII chars, and
>> then keyboard.c applies a "& 0377" to it, so there's a risk of losing
>> some bits and turning a non-ASCII keypress into some ASCII char.
> Without the eassert, C-ñ returns ' (U+2018, translated from \221), C-ç
> returns ‡ (U+2021, translated from \207). Not sure whether that is
> intended or not.
Well, what does it look like to you? To me it looks like a plain bug.
Can you try the patch below?
Stefan
--- w32term.c.~1.276.~ 2007-11-09 10:15:55.000000000 -0500
+++ w32term.c 2007-12-12 14:43:54.000000000 -0500
@@ -4329,7 +4329,9 @@
if (temp_index == sizeof temp_buffer / sizeof (short))
temp_index = 0;
temp_buffer[temp_index++] = msg.msg.wParam;
- inev.kind = ASCII_KEYSTROKE_EVENT;
+ inev.kind = (msg.msg.wParam < 0xff
+ ? ASCII_KEYSTROKE_EVENT
+ : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
inev.code = msg.msg.wParam;
inev.modifiers = msg.dwModifiers;
XSETFRAME (inev.frame_or_window, f);
next prev parent reply other threads:[~2007-12-12 20:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 15:14 assertion failed: c == event->code Juanma Barranquero
2007-12-12 17:30 ` Stefan Monnier
2007-12-12 18:00 ` Juanma Barranquero
2007-12-12 20:05 ` Stefan Monnier [this message]
2007-12-12 22:54 ` Juanma Barranquero
2007-12-12 23:41 ` Jason Rumney
2007-12-13 14:16 ` Jason Rumney
2007-12-13 15:09 ` Juanma Barranquero
2007-12-13 16:37 ` Jason Rumney
2007-12-13 16:44 ` Juanma Barranquero
2007-12-14 9:24 ` Jason Rumney
2007-12-14 10:11 ` Juanma Barranquero
2007-12-14 1:08 ` Kenichi Handa
2007-12-14 8:47 ` Jason Rumney
2007-12-14 11:11 ` Kenichi Handa
2007-12-14 12:23 ` Jason Rumney
2007-12-14 14:25 ` Juanma Barranquero
2007-12-16 15:19 ` Juanma Barranquero
2007-12-16 20:49 ` Jason Rumney
2007-12-16 20:53 ` Juanma Barranquero
2007-12-16 20:59 ` Juanma Barranquero
2007-12-16 21:25 ` Miles Bader
2007-12-17 1:52 ` Jason Rumney
2007-12-17 9:06 ` Juanma Barranquero
2007-12-12 18:36 ` Andreas Schwab
2007-12-12 17:54 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvve73bryg.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).