mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 09:39:16 +02:00
MG: fixed stopping keypress event if handled by LCL
git-svn-id: trunk@2084 -
This commit is contained in:
parent
ab650debf3
commit
45e5195ad2
@ -493,7 +493,7 @@ begin
|
|||||||
Event^.theString[0] := Char(Msg.CharCode);
|
Event^.theString[0] := Char(Msg.CharCode);
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
Event^.KeyVal := Msg.CharCode;
|
Event^.KeyVal := Msg.CharCode;
|
||||||
If Msg.CharCode <> 0 then
|
If Msg.CharCode <> VK_UNKNOWN then
|
||||||
KeyCode := Msg.CharCode
|
KeyCode := Msg.CharCode
|
||||||
else
|
else
|
||||||
KeyCode := $FFFF;
|
KeyCode := $FFFF;
|
||||||
@ -519,7 +519,9 @@ begin
|
|||||||
TObject(Data).Dispatch(Msg);
|
TObject(Data).Dispatch(Msg);
|
||||||
Result := (Msg.Result=0);
|
Result := (Msg.Result=0);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
If Msg.CharCode <> KeyCode then
|
If Msg.CharCode <> KeyCode then begin
|
||||||
|
// key was handled by lcl
|
||||||
|
gtk_signal_emit_stop_by_name (GTK_OBJECT (Widget), 'key_press_event');
|
||||||
If ((Msg.CharCode >= 31) and (Msg.CharCode <= 255))
|
If ((Msg.CharCode >= 31) and (Msg.CharCode <= 255))
|
||||||
or (Msg.CharCode = 0) then
|
or (Msg.CharCode = 0) then
|
||||||
begin
|
begin
|
||||||
@ -528,6 +530,7 @@ begin
|
|||||||
{$EndIf}
|
{$EndIf}
|
||||||
Event^.KeyVal := Msg.CharCode;
|
Event^.KeyVal := Msg.CharCode;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
//This is disabled on account of the
|
//This is disabled on account of the
|
||||||
//strange behaviour in TSynEdit
|
//strange behaviour in TSynEdit
|
||||||
@ -2461,6 +2464,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.141 2002/10/06 20:24:27 lazarus
|
||||||
|
MG: fixed stopping keypress event if handled by LCL
|
||||||
|
|
||||||
Revision 1.140 2002/10/04 20:46:52 lazarus
|
Revision 1.140 2002/10/04 20:46:52 lazarus
|
||||||
MG: improved TComboBox.SetItemIndex
|
MG: improved TComboBox.SetItemIndex
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user