[feat](trx-client): merge R/T hotkeys into single R, add F for freq input

Combine round (R) and retune (T) into a single R hotkey that rounds to
the nearest jog step boundary, or retunes if already rounded. Update F
hotkey description to "Pick frequency" in the F1 help overlay.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-29 23:10:03 +02:00
parent ce816773ab
commit 4aae2fa725
2 changed files with 12 additions and 19 deletions
@@ -10654,27 +10654,21 @@ window.addEventListener("keydown", (event) => {
return;
}
// R — round frequency up to the next jog step boundary
// R — round frequency to nearest jog step boundary, or retune if already round
if (key === "r") {
event.preventDefault();
if (lastLocked) { showHint("Locked", 1500); return; }
if (lastFreqHz != null) {
const step = Math.max(1, jogStep);
const rounded = Math.ceil(lastFreqHz / step) * step;
const newHz = rounded === lastFreqHz ? lastFreqHz + step : rounded;
if (!freqAllowed(newHz)) { showUnsupportedFreqPopup(newHz); return; }
setRigFrequency(newHz);
showHint(`Rounded → ${formatFreq(newHz)}`, 1200);
}
return;
}
// T — retune current frequency (re-send same settings)
if (key === "t") {
event.preventDefault();
if (lastFreqHz != null) {
showHint("Retuning…", 1200);
setRigFrequency(lastFreqHz);
const rounded = Math.round(lastFreqHz / step) * step;
if (rounded !== lastFreqHz) {
if (!freqAllowed(rounded)) { showUnsupportedFreqPopup(rounded); return; }
setRigFrequency(rounded);
showHint(`Rounded → ${formatFreq(rounded)}`, 1200);
} else {
setRigFrequency(lastFreqHz);
showHint("Retuning…", 1200);
}
}
return;
}