Skip to content
7 changes: 4 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,15 +750,16 @@ When the MIDI Editor is set to Event List mode, REAPER presents a list with all
When a note gets focus in the list, OSARA will play a preview of the focused note.
To cancel a note preview, press the Control key.

### Navigating FX Presets Without Activating Them (Windows Only)
### Searching and navigating FX Presets Without Activating Them (Windows Only)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Navigating should have a capital n, since we're using title case in the rest of this heading.

REAPER's FX preset combo box doesn't allow keyboard users to move through presets without activating them.
Sometimes, you need to be able to examine or search the available presets without activating each one.
OSARA provides a dialog to facilitate this.

You activate this dialog by pressing Alt+DownArrow when focused on REAPER's FX preset combo box.
The dialog displays the preset list and allows you to navigate without presets being automatically activated.
The Filter field allows you to filter the list to show only presets containing the entered text.
Pressing the OK button activates the preset that's currently selected in the list.
The Filter field (Alt+F) allows you to filter the list to show only presets containing the entered text.
Pressing Enter while focus is in the list box or Alt+A to click the Apply button loads the selected preset.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we say "activate the Apply button"? I'm not a fan of using a mouse specific term like "click" for keyboard users. :) I'll grant this is pedantry, though. Same on the line below.

Pressing Escape or Alt+C to click the Close button closes the dialog, clears the filter and returns keyboard focus to REAPER's FX preset combo box.

### Configuration
OSARA provides a Configuration dialog to adjust various settings.
Expand Down
15 changes: 14 additions & 1 deletion src/fxChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,18 @@ class PresetDialog {
HWND dialog;
HWND list; // Our preset ListView.
string filter;
accelerator_register_t accelReg;

static int translateAccel(MSG* msg, accelerator_register_t* accelReg) {
PresetDialog*dialog = (PresetDialog*)accelReg->user;
if (msg->hwnd == dialog->list && msg->wParam == VK_SPACE) {
return -666;
}
return -1;
}

void close() {
plugin_register("-accelerator", &this->accelReg);
DestroyWindow(this->dialog);
SetFocus(this->combo);
delete this;
Expand All @@ -239,7 +249,6 @@ class PresetDialog {
return TRUE;
} else if (LOWORD(wParam) == IDOK) {
dialog->applyPreset();
dialog->close();
return TRUE;
} else if (LOWORD(wParam) == IDCANCEL) {
dialog->close();
Expand Down Expand Up @@ -344,6 +353,10 @@ class PresetDialog {
col.cx = 150;
ListView_InsertColumn(this->list, 0, &col);
this->updateList();
this->accelReg.translateAccel = &this->translateAccel;
this->accelReg.isLocal = true;
this->accelReg.user = (void*)this;
plugin_register("accelerator", &this->accelReg);
ShowWindow(this->dialog, SW_SHOWNORMAL);
}

Expand Down
7 changes: 4 additions & 3 deletions src/reaper_osara.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ END
ID_FX_PRESET_DLG DIALOGEX 250, 125, 200, 350
CAPTION "FX Preset"
BEGIN
LTEXT "&Presets:", IDC_STATIC, 10, 0, 40, 10
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that even if we support control+space eventually, we wouldn't use this label because it's localised. I don't mind whether we keep this or not, but I thought I'd flag this in case it's the only reason you added the label here.

CONTROL "", ID_FXPRE_PRESET, "SysListView32", WS_TABSTOP | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER, 10, 10, 180, 280
LTEXT "Filter:", IDC_STATIC, 10, 300, 23, 10
LTEXT "&Filter:", IDC_STATIC, 10, 300, 23, 10
EDITTEXT ID_FXPRE_FILTER, 40, 300, 40, 10
DEFPUSHBUTTON "&OK", IDOK, 10, 320, 40, 14
PUSHBUTTON "&Cancel", IDCANCEL, 140, 320, 40, 14
DEFPUSHBUTTON "&Apply", IDOK, 10, 320, 40, 14
PUSHBUTTON "&Close", IDCANCEL, 140, 320, 40, 14
END

ID_UPDATE_DLG DIALOGEX 250, 125, 500, 355
Expand Down