mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 10:00:34 +02:00
Qt,Qt5,Qt6: do not send KeyUp if key is autorepeated. issue #41472
This commit is contained in:
parent
3360fef947
commit
f90db81742
@ -3112,6 +3112,12 @@ begin
|
|||||||
if not CanSendLCLMessage then
|
if not CanSendLCLMessage then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
if (QEvent_type(Event) = QEventKeyRelease) and QKeyEvent_isAutoRepeat(QKeyEventH(Event)) then
|
||||||
|
begin
|
||||||
|
QEvent_ignore(Event);
|
||||||
|
exit(False);
|
||||||
|
end;
|
||||||
|
|
||||||
FillChar(KeyMsg{%H-}, SizeOf(KeyMsg), #0);
|
FillChar(KeyMsg{%H-}, SizeOf(KeyMsg), #0);
|
||||||
FillChar(CharMsg{%H-}, SizeOf(CharMsg), #0);
|
FillChar(CharMsg{%H-}, SizeOf(CharMsg), #0);
|
||||||
UTF8Text := '';
|
UTF8Text := '';
|
||||||
|
@ -3240,6 +3240,12 @@ begin
|
|||||||
if not CanSendLCLMessage then
|
if not CanSendLCLMessage then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
if (QEvent_type(Event) = QEventKeyRelease) and QKeyEvent_isAutoRepeat(QKeyEventH(Event)) then
|
||||||
|
begin
|
||||||
|
QEvent_ignore(Event);
|
||||||
|
exit(False);
|
||||||
|
end;
|
||||||
|
|
||||||
FillChar(KeyMsg{%H-}, SizeOf(KeyMsg), #0);
|
FillChar(KeyMsg{%H-}, SizeOf(KeyMsg), #0);
|
||||||
FillChar(CharMsg{%H-}, SizeOf(CharMsg), #0);
|
FillChar(CharMsg{%H-}, SizeOf(CharMsg), #0);
|
||||||
UTF8Text := '';
|
UTF8Text := '';
|
||||||
|
@ -3237,6 +3237,12 @@ begin
|
|||||||
if not CanSendLCLMessage then
|
if not CanSendLCLMessage then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
if (QEvent_type(Event) = QEventKeyRelease) and QKeyEvent_isAutoRepeat(QKeyEventH(Event)) then
|
||||||
|
begin
|
||||||
|
QEvent_ignore(Event);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
FillChar(KeyMsg{%H-}, SizeOf(KeyMsg), #0);
|
FillChar(KeyMsg{%H-}, SizeOf(KeyMsg), #0);
|
||||||
FillChar(CharMsg{%H-}, SizeOf(CharMsg), #0);
|
FillChar(CharMsg{%H-}, SizeOf(CharMsg), #0);
|
||||||
UTF8Text := '';
|
UTF8Text := '';
|
||||||
|
Loading…
Reference in New Issue
Block a user