mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 09:59:10 +02:00
fix win32 keyhandling, send cn_char
git-svn-id: trunk@5729 -
This commit is contained in:
parent
6a261b4580
commit
5d5266b9f3
@ -3062,9 +3062,7 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TWinControl.CNChar(var Message: TLMKeyUp);
|
procedure TWinControl.CNChar(var Message: TLMKeyUp);
|
||||||
begin
|
begin
|
||||||
{$IFNDEF Win32}
|
|
||||||
if not DoKeyPress(Message) then {inherited}; // there is nothing to inherit
|
if not DoKeyPress(Message) then {inherited}; // there is nothing to inherit
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -3165,9 +3163,6 @@ end;
|
|||||||
procedure TWinControl.WMChar(var Message: TLMChar);
|
procedure TWinControl.WMChar(var Message: TLMChar);
|
||||||
begin
|
begin
|
||||||
Assert(False, Format('Trace:[TWinControl.WMChar] %s', [ClassName]));
|
Assert(False, Format('Trace:[TWinControl.WMChar] %s', [ClassName]));
|
||||||
{$IFDEF Win32}
|
|
||||||
if not DoKeyPress(Message) then {inherited}; // there is nothing to inherit
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -3796,6 +3791,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.259 2004/08/04 07:32:01 micha
|
||||||
|
fix win32 keyhandling, send cn_char
|
||||||
|
|
||||||
Revision 1.258 2004/08/03 09:01:54 mattias
|
Revision 1.258 2004/08/03 09:01:54 mattias
|
||||||
LCL now handles for non win32 CN_CHAR
|
LCL now handles for non win32 CN_CHAR
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ Begin
|
|||||||
PLMsg:=@LMChar;
|
PLMsg:=@LMChar;
|
||||||
With LMChar Do
|
With LMChar Do
|
||||||
Begin
|
Begin
|
||||||
Msg := LM_CHAR;
|
Msg := CN_CHAR;
|
||||||
KeyData := LParam;
|
KeyData := LParam;
|
||||||
CharCode := Word(WParam);
|
CharCode := Word(WParam);
|
||||||
Assert(False,Format('WM_CHAR KeyData= %d CharCode= %d ',[KeyData,CharCode]));
|
Assert(False,Format('WM_CHAR KeyData= %d CharCode= %d ',[KeyData,CharCode]));
|
||||||
@ -555,7 +555,7 @@ Begin
|
|||||||
End;
|
End;
|
||||||
WM_GETDLGCODE:
|
WM_GETDLGCODE:
|
||||||
Begin
|
Begin
|
||||||
LMessage.Msg := LM_GETDLGCODE;
|
Result := DLGC_WANTALLKEYS;
|
||||||
WinProcess := false;
|
WinProcess := false;
|
||||||
End;
|
End;
|
||||||
WM_KEYDOWN:
|
WM_KEYDOWN:
|
||||||
@ -1073,8 +1073,21 @@ Begin
|
|||||||
WM_CHAR, WM_KEYDOWN, WM_KEYUP:
|
WM_CHAR, WM_KEYDOWN, WM_KEYUP:
|
||||||
begin
|
begin
|
||||||
case Msg of
|
case Msg of
|
||||||
WM_CHAR: CharCode := LMChar.CharCode;
|
WM_CHAR:
|
||||||
WM_KEYDOWN, WM_KEYUP: CharCode := LMKey.CharCode;
|
begin
|
||||||
|
CharCode := LMChar.CharCode;
|
||||||
|
LMChar.Msg := LM_CHAR;
|
||||||
|
end;
|
||||||
|
WM_KEYDOWN:
|
||||||
|
begin
|
||||||
|
CharCode := LMKey.CharCode;
|
||||||
|
LMKey.Msg := LM_KEYDOWN;
|
||||||
|
end;
|
||||||
|
WM_KEYUP:
|
||||||
|
begin
|
||||||
|
CharCode := LMKey.CharCode;
|
||||||
|
LMKey.Msg := LM_KEYUP;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
case CharCode of
|
case CharCode of
|
||||||
VK_RETURN:
|
VK_RETURN:
|
||||||
@ -1087,7 +1100,6 @@ Begin
|
|||||||
if (DlgCode = 0) or ((DlgCode and CallDefaultWindowProc(Window, WM_GETDLGCODE, 0, 0)) = 0) then
|
if (DlgCode = 0) or ((DlgCode and CallDefaultWindowProc(Window, WM_GETDLGCODE, 0, 0)) = 0) then
|
||||||
begin
|
begin
|
||||||
// windows didn't want the key
|
// windows didn't want the key
|
||||||
PLMsg^.Msg := LM_CHAR;
|
|
||||||
DeliverMessage(OwnerObject, PLMsg^);
|
DeliverMessage(OwnerObject, PLMsg^);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1302,6 +1314,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.131 2004/08/04 07:32:01 micha
|
||||||
|
fix win32 keyhandling, send cn_char
|
||||||
|
|
||||||
Revision 1.130 2004/08/01 14:21:06 micha
|
Revision 1.130 2004/08/01 14:21:06 micha
|
||||||
better pre/post-intf key handling
|
better pre/post-intf key handling
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user