[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; 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") { if (key === "r") {
event.preventDefault(); event.preventDefault();
if (lastLocked) { showHint("Locked", 1500); return; } if (lastLocked) { showHint("Locked", 1500); return; }
if (lastFreqHz != null) { if (lastFreqHz != null) {
const step = Math.max(1, jogStep); const step = Math.max(1, jogStep);
const rounded = Math.ceil(lastFreqHz / step) * step; const rounded = Math.round(lastFreqHz / step) * step;
const newHz = rounded === lastFreqHz ? lastFreqHz + step : rounded; if (rounded !== lastFreqHz) {
if (!freqAllowed(newHz)) { showUnsupportedFreqPopup(newHz); return; } if (!freqAllowed(rounded)) { showUnsupportedFreqPopup(rounded); return; }
setRigFrequency(newHz); setRigFrequency(rounded);
showHint(`Rounded → ${formatFreq(newHz)}`, 1200); showHint(`Rounded → ${formatFreq(rounded)}`, 1200);
} } else {
return; setRigFrequency(lastFreqHz);
} showHint("Retuning…", 1200);
}
// T — retune current frequency (re-send same settings)
if (key === "t") {
event.preventDefault();
if (lastFreqHz != null) {
showHint("Retuning…", 1200);
setRigFrequency(lastFreqHz);
} }
return; return;
} }
@@ -1347,9 +1347,8 @@
<div class="shortcut-overlay-title">Keyboard Shortcuts</div> <div class="shortcut-overlay-title">Keyboard Shortcuts</div>
<table class="shortcut-table"> <table class="shortcut-table">
<tbody> <tbody>
<tr><td class="shortcut-key"><kbd>F</kbd></td><td>Focus frequency input</td></tr> <tr><td class="shortcut-key"><kbd>F</kbd></td><td>Pick frequency (focus input)</td></tr>
<tr><td class="shortcut-key"><kbd>R</kbd></td><td>Round frequency up to next step</td></tr> <tr><td class="shortcut-key"><kbd>R</kbd></td><td>Round to nearest step / retune</td></tr>
<tr><td class="shortcut-key"><kbd>T</kbd></td><td>Retune current frequency</td></tr>
<tr><td class="shortcut-key"><kbd>B</kbd></td><td>Jump to previous freq/bw/mode</td></tr> <tr><td class="shortcut-key"><kbd>B</kbd></td><td>Jump to previous freq/bw/mode</td></tr>
<tr><td class="shortcut-key"><kbd>[</kbd> / <kbd>]</kbd></td><td>Narrow / widen bandwidth (±10 kHz)</td></tr> <tr><td class="shortcut-key"><kbd>[</kbd> / <kbd>]</kbd></td><td>Narrow / widen bandwidth (±10 kHz)</td></tr>
<tr><td class="shortcut-key"><kbd></kbd> / <kbd></kbd></td><td>Tune by current step</td></tr> <tr><td class="shortcut-key"><kbd></kbd> / <kbd></kbd></td><td>Tune by current step</td></tr>