[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:
@@ -10387,8 +10387,23 @@ window.addEventListener("keydown", (event) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// R — retune current frequency (re-send same settings)
|
// R — round frequency up to the next jog step boundary
|
||||||
if (key === "r") {
|
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();
|
event.preventDefault();
|
||||||
if (lastFreqHz != null) {
|
if (lastFreqHz != null) {
|
||||||
showHint("Retuning…", 1200);
|
showHint("Retuning…", 1200);
|
||||||
|
|||||||
@@ -1165,7 +1165,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>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>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>
|
||||||
|
|||||||
Reference in New Issue
Block a user