Hi, Neil Hodgson

        I set breakpoint in ScintillaWin.WndProc in the 
WM_SYSKEYDOWN/WM_KEYDOWN handler, found that every strange accelerate is 
processed by ::DefWindowProc, but then some one (I don't know who -_-b ) sends 
a WM_CHAR message to the window. In the WM_CHAR handler, there's a function 
call iscntrl() to judge if the integer represents a control character, but 
another more condition lastKeyDownConsumed. I could not understand the usage of 
variable lastKeyDownConsumed, may I change || to && as shown below ?

        case WM_CHAR:
                if (!iscntrl(wParam&0xff) && !lastKeyDownConsumed) {
                                 ~~~~

                        if (IsUnicodeMode()) {
                                // For a wide character version of the window:
                                //char utfval[4];
                                //wchar_t wcs[2] = {wParam, 0};
                                //unsigned int len = UTF8Length(wcs, 1);
                                //UTF8FromUTF16(wcs, 1, utfval, len);
                                //AddCharUTF(utfval, len);
                                AddCharBytes('\0', LOBYTE(wParam));
                        } else {
                                AddChar(LOBYTE(wParam));
                        }
                }
                return 0;

====== 2007-08-01 08:37:39 you said:=======

>YangFan:
>
>>         I read the Scintilla source code, it's not in the keymap,
>> and I'm sure my application do not process these keys. I
>> create simple demos to show Scintilla control, and do nothing
>> else, then the accelerates exist.
>
>   The keys mentioned do not perform commands for me, instead they
>just enter text. Best thing to do now is to run the code under a
>debugger with breakpoints in the WM_SYSKEYDOWN / WM_KEYDOWN handling
>to see what is happening.
>
>   Neil
>_______________________________________________
>Scintilla-interest mailing list
>[email protected]
>http://mailman.lyra.org/mailman/listinfo/scintilla-interest

= = = = = = = = = = = = = = = = = = = =
                        

        Regards

 
                                 
        YangFan
[EMAIL PROTECTED]
          2007-08-01


_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to