[feat](trx-frontend-http): add R hotkey to round frequency up to next step

Remap retune from R to T, and add a new R hotkey that rounds the
current frequency forward to the next jog-step boundary. Both the
new hotkey and the remapped retune are documented in the F1 help
overlay.

https://claude.ai/code/session_017neG2jL9uXFSRpmhyS1EqG
Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-27 20:51:46 +00:00
committed by Stan Grams
parent 7c33af3d83
commit 12726f3d2c
2 changed files with 18 additions and 2 deletions
@@ -10387,8 +10387,23 @@ window.addEventListener("keydown", (event) => {
return;
}
// R — retune current frequency (re-send same settings)
// R — round frequency up to the next jog step boundary
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);
@@ -1165,7 +1165,8 @@
<div class="shortcut-overlay-title">Keyboard Shortcuts</div>
<table class="shortcut-table">
<tbody>
<tr><td class="shortcut-key"><kbd>R</kbd></td><td>Retune current frequency</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>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>[</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>