[fix](trx-client): R hotkey no-ops when frequency already on step grid

Previously R would retune even when the frequency was already aligned
to the jog step boundary. Now it shows "Already on step" and sends no
command. Also remove the stale "retune" label from the shortcut help.

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-30 00:13:46 +02:00
parent 3a2733850c
commit 6000c30d9c
2 changed files with 3 additions and 4 deletions
@@ -10703,7 +10703,7 @@ window.addEventListener("keydown", (event) => {
return; return;
} }
// R — round frequency to nearest jog step boundary, or retune if already round // R — round frequency to nearest jog step boundary
if (key === "r") { if (key === "r") {
event.preventDefault(); event.preventDefault();
if (lastLocked) { showHint("Locked", 1500); return; } if (lastLocked) { showHint("Locked", 1500); return; }
@@ -10715,8 +10715,7 @@ window.addEventListener("keydown", (event) => {
setRigFrequency(rounded); setRigFrequency(rounded);
showHint(`Rounded → ${formatFreq(rounded)}`, 1200); showHint(`Rounded → ${formatFreq(rounded)}`, 1200);
} else { } else {
setRigFrequency(lastFreqHz); showHint("Already on step", 1200);
showHint("Retuning…", 1200);
} }
} }
return; return;
@@ -1386,7 +1386,7 @@
<table class="shortcut-table"> <table class="shortcut-table">
<tbody> <tbody>
<tr><td class="shortcut-key"><kbd>F</kbd></td><td>Pick frequency (focus 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 to nearest step / retune</td></tr> <tr><td class="shortcut-key"><kbd>R</kbd></td><td>Round to nearest step</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>