mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-25 13:18:37 -05:00
Add global key [ and ] for nudging modem by snap setting
This commit is contained in:
parent
843363d961
commit
8f0ba10735
@ -1611,6 +1611,7 @@ int AppFrame::OnGlobalKeyDown(wxKeyEvent &event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DemodulatorInstance *demod = nullptr, *lastDemod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
DemodulatorInstance *demod = nullptr, *lastDemod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
||||||
|
int snap = wxGetApp().getFrequencySnap();
|
||||||
|
|
||||||
switch (event.GetKeyCode()) {
|
switch (event.GetKeyCode()) {
|
||||||
case WXK_UP:
|
case WXK_UP:
|
||||||
@ -1621,8 +1622,20 @@ int AppFrame::OnGlobalKeyDown(wxKeyEvent &event) {
|
|||||||
case WXK_NUMPAD_LEFT:
|
case WXK_NUMPAD_LEFT:
|
||||||
case WXK_RIGHT:
|
case WXK_RIGHT:
|
||||||
case WXK_NUMPAD_RIGHT:
|
case WXK_NUMPAD_RIGHT:
|
||||||
waterfallCanvas->OnKeyDown(event);
|
waterfallCanvas->OnKeyDown(event); // TODO: Move the stuff from there to here
|
||||||
return 1;
|
return 1;
|
||||||
|
case ']':
|
||||||
|
if (lastDemod) {
|
||||||
|
lastDemod->setFrequency(lastDemod->getFrequency()+snap);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
break;
|
||||||
|
case '[':
|
||||||
|
if (lastDemod) {
|
||||||
|
lastDemod->setFrequency(lastDemod->getFrequency()-snap);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
case 'F':
|
case 'F':
|
||||||
case 'L':
|
case 'L':
|
||||||
@ -1716,6 +1729,9 @@ int AppFrame::OnGlobalKeyUp(wxKeyEvent &event) {
|
|||||||
wxGetApp().setSoloMode(!wxGetApp().getSoloMode());
|
wxGetApp().setSoloMode(!wxGetApp().getSoloMode());
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
case ']':
|
||||||
|
case '[':
|
||||||
|
return 1;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user