[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: assertion failed: c == event->code
From: |
Stefan Monnier |
Subject: |
Re: assertion failed: c == event->code |
Date: |
Wed, 12 Dec 2007 15:05:16 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
>> 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);
- assertion failed: c == event->code, Juanma Barranquero, 2007/12/12
- Re: assertion failed: c == event->code, Stefan Monnier, 2007/12/12
- Re: assertion failed: c == event->code, Juanma Barranquero, 2007/12/12
- Re: assertion failed: c == event->code, Jason Rumney, 2007/12/13
- Re: assertion failed: c == event->code, Juanma Barranquero, 2007/12/13
- Re: assertion failed: c == event->code, Jason Rumney, 2007/12/13
- Re: assertion failed: c == event->code, Juanma Barranquero, 2007/12/13
- Re: assertion failed: c == event->code, Jason Rumney, 2007/12/14
- Re: assertion failed: c == event->code, Juanma Barranquero, 2007/12/14
- Re: assertion failed: c == event->code, Kenichi Handa, 2007/12/13
- Re: assertion failed: c == event->code, Jason Rumney, 2007/12/14