fix: ESC now stops the active CW engine (Icom/Flex), not just WinKeyer

The ESC abort keyed WinkeyerStop unconditionally, so it never aborted the Icom
CI-V or Flex CWX keyer. Route the stop through cwSource like the panel Stop
button does.
This commit is contained in:
2026-07-20 15:51:32 +02:00
parent 9729ef62ba
commit b8db653981
+8 -1
View File
@@ -2888,7 +2888,14 @@ export default function App() {
const keyerLive = wkActiveRef.current; const keyerLive = wkActiveRef.current;
// ESC aborts the current CW transmission AND the auto-call loop, so it // ESC aborts the current CW transmission AND the auto-call loop, so it
// won't resend after the gap — you must click a CQ macro to restart it. // won't resend after the gap — you must click a CQ macro to restart it.
if (keyerLive) { stopAutoCall(); WinkeyerStop().catch(() => {}); } // Route the abort to whichever engine is active (was WinKeyer-only, so
// ESC didn't stop the Icom or Flex keyer).
if (keyerLive) {
stopAutoCall();
if (cwSourceRef.current === 'icom') IcomStopCW().catch(() => {});
else if (cwSourceRef.current === 'flex') FlexStopCW().catch(() => {});
else WinkeyerStop().catch(() => {});
}
if (!keyerLive || wkEscClearsRef.current) { if (!keyerLive || wkEscClearsRef.current) {
resetEntry(); resetEntry();
callsignRef.current?.focus(); callsignRef.current?.focus();