|
@@ -402,11 +402,17 @@ begin
|
|
if CtrlBreak then
|
|
if CtrlBreak then
|
|
CrtCtrlBreakHandler := not (CheckBreak)
|
|
CrtCtrlBreakHandler := not (CheckBreak)
|
|
else (* Ctrl-C pressed *)
|
|
else (* Ctrl-C pressed *)
|
|
|
|
+{$IFDEF FPC_CRT_CTRLC_TREATED_AS_KEY}
|
|
|
|
+ (* If Ctrl-C is really treated as a key, the following branch should never *)
|
|
|
|
+ (* be executed, but let's stay on the safe side and ensure predictability. *)
|
|
|
|
+ CrtCtrlBreakHandler := false;
|
|
|
|
+{$ELSE FPC_CRT_CTRLC_TREATED_AS_KEY}
|
|
begin
|
|
begin
|
|
if not (SpecialKey) and (ScanCode = 0) then
|
|
if not (SpecialKey) and (ScanCode = 0) then
|
|
ScanCode := 3;
|
|
ScanCode := 3;
|
|
CrtCtrlBreakHandler := true;
|
|
CrtCtrlBreakHandler := true;
|
|
end;
|
|
end;
|
|
|
|
+{$ENDIF FPC_CRT_CTRLC_TREATED_AS_KEY}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|