Latching mode: don't repeatedly toggle TX and RX.

pull/1409/head
Mooneer Salem 2026-06-20 17:51:00 -07:00
parent dc02fae4a1
commit 82b9971c08
1 changed files with 2 additions and 1 deletions

View File

@ -1076,6 +1076,7 @@ int MainApp::FilterEvent(wxEvent& event)
if ((event.GetEventType() == wxEVT_KEY_DOWN) &&
(((wxKeyEvent&)event).GetKeyCode() == wxGetApp().appConfiguration.pttKeyCode))
{
bool pttKeyChanging = !PttKeyDown_;
PttKeyDown_ = true;
// only use space to toggle PTT if we are running and no modal dialogs (like options) up
@ -1101,7 +1102,7 @@ int MainApp::FilterEvent(wxEvent& event)
frame->m_btnTogPTT->SetBackgroundColour(*wxRED);
frame->togglePTT();
}
} else {
} else if (pttKeyChanging) {
// Latching mode: toggle TX state on each key press.
if (frame->m_btnTogPTT->GetValue())
frame->m_btnTogPTT->SetValue(false);