surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.01k stars 386 forks source link

A11y menu jump reaper macos #7281

Open baconpaul opened 8 months ago

baconpaul commented 8 months ago

Sorry just saw this. If I go into a menu, say presets, the minute I select an item I'm dropped back into the REAPER main window and have to switch windows back to surge again. This happens consistently. The same behavior doesn't occur in the standalone application.

baconpaul commented 8 months ago

Summary from Discord:

at-ZachB13 OK spent some time debugging. Here's wha t I see, macos latest surge, voiceover on

Menu traversal works fine Menu pressing enter selects and returns focus to parch browser Menu pressing ctrl-opt-space selects and returns focus to patch browser Menu pressing escape dismisses menu and dismisses surge window

I debugged the juce and surge code and both are handling the key press in case 4 properly if delivered. My theory is that Reaper top level window never sends the escape to the plugin and just closes its window (which in turn cleans up the menu).

If that is the case, and it seems to be, then it is indeed a Reaper bug. Nothing to do with voice over even - same happens with it on or off (except of course 3 doesn't work with voice over off)

I don't think theres anything I can do here. I suppose I could add another key binding to dismiss the menu which doesn't interfere with reaper?

Thoughts on (1) if that is what you see and (2) best course to proceed welcome. at-ZachB13 yes confirmed. I placed a debug statement in the menu key handler. In the standalone the escape key is delivered to me; in reaper it is not. This is absolutely a Reaper bug. at-EvilDragon what's the best way to report bug to reaper devs nowadays?

baconpaul commented 8 months ago

Sent following to support at cockos.com


Heya folks

baconpaul from surge/clap/etc here

So we had an interesting report from one of our blind users about reaper on macos. Here’s the basic issue

Keyboard navigation of menus works well for accessible users. We have gestures to open and navigate and close. The ‘close-and-select’ gesture works fine but the ‘close-and-cancel’ gesture (the ‘esc’ key) in reaper in a window which is docked in your FX panel doesn’t on macOS at least.

What seems to be happening is a user opens a menu, presses escape, and rather than my JUCE code getting a chance to process the escape and close the menu, reaper steals that key and closes the overall window dumping you out to the track view. Every other key goes to the plugin first.

So I think this is a reaper bug; you intercept “esc” too early and so I don’t get a chance to use it to close my menu.

For now I’ve added a patch to our JUCE branch (https://github.com/surge-synthesizer/surge/pull/7288) which also allows you to use Shift-F10 to close a menu (that is our menu open keybinding) and in reaper I can now close menus without select and without bailing out.

But I think this may be something you can fix in Reaper too? So figured I would drop a note.

Thanks as always!

- Paul
baconpaul commented 8 months ago

With above merged and reported, I'm going to bounce this out of 1.3 since there's nothing more we can do I don't think.