jcsteh / osara

OSARA: Open Source Accessibility for the REAPER Application
GNU General Public License v2.0
127 stars 46 forks source link

Can Shift+Space become the keystroke for toggling selection in list box controls? #869

Closed ScottChesworth closed 6 months ago

ScottChesworth commented 1 year ago

It's been raised on RWP that as things stand, it's not possible to pause when in the MIDI event list view. That's a list box control where on Windows, Control+Space toggles selection of the highlighted event instead of pausing. That's a sticky wicket, because ideally we need to be able to do both of the things Control+Space does.

I know it's not standard for the OS, but would it be possible to hack it so that Shift+Space toggles selection of the highlighted entry when in list box controls? That way, even when it's not OSARA's non-contiguous selection mode handling the workflow, users would at least have a consistent keystroke.

Another alternative could perhaps be to switch around what's bound to Control+Space and Shift+Space, but that would invalidate so many established training resources, I'd rather avoid going that route if possible.

Thoughts? How much gruntwork is it? As per usual I don't know how this would be done, but am happy to tinker and research if someone wants to point me at relevant code.

jcsteh commented 1 year ago

Ug. I guess it's possible, but it would be Windows specific and very hacky. We'd also need to intercept control+space and send it to REAPER's main section. Unless binding it in global scope fixes that part at least?

We'd need to intercept shift+space in the keyboard hook and send the appropriate SysListView32 window messages to toggle selection of the current item, but only in the MIDI event list.

jcsteh commented 1 year ago

Actually, maybe it doesn't need to be quite that hacky. Are you able to rebind control+space and shift+space in the MIDI event list editor scope? Can control+space pass through to main section? If so, then all we'd need is an OSARA action to toggle the selection of the current list view item, which is still hacky but much less so than messing around with the keyboard hook.

ScottChesworth commented 1 year ago

Are you able to rebind control+space and shift+space in the MIDI event list editor scope?

No, because OSARA's noncontiguous action isn't visible in anything other than main section at the moment.

Can control+space pass through to main section?

Tried binding that, but toggling selection still takes priority when keyboard focus is in the list box control.

jcsteh commented 1 year ago

Sorry, I meant can you rebind it to anything. OSARA's non-contiguous action wouldn't work here even if it could be bound. We need something entirely different for this.

What about binding control+space globally?

ScottChesworth commented 1 year ago

What about binding control+space globally?

Wouldn't that cut into the usefulness of Control+Space playing/stopping when the params GUI is open? IMO play/pause is less useful than play/stop in that scenario, because play/stop enables you to audition the same section over again easily.

Sorry, I meant can you rebind it to anything.

I don't get the question.

jcsteh commented 1 year ago

Wouldn't that cut into the usefulness of Control+Space playing/stopping when the params GUI is open?

I guess so. That has always been a bit of a happy accident, but I agree it's a happy accident users have come to rely on, albeit only on Windows.

My question was whether you could bind shift+space or control+space in that section (I don't care to what - just anything that proves the binding worked). You've already answered that for control+space (it doesn't work), but I'm curious as to whether shift+space can be bound there.

ScottChesworth commented 1 year ago

Shift+Space can be bound yeah, it works when focus is in the list box.

ptorpey commented 1 year ago

Still curious how sighted users pause if control+space is grabbed by the Windows OS for non-contiguous selection?

--Pete

From: ScottChesworth @.> Sent: Thursday, February 23, 2023 8:58 AM To: jcsteh/osara @.> Cc: Subscribed @.***> Subject: Re: [jcsteh/osara] Can Shift+Space become the keystroke for toggling selection in list box controls? (Issue #869)

Shift+Space can be bound yeah, it works when focus is in the list box.

— Reply to this email directly, view it on GitHub https://github.com/jcsteh/osara/issues/869#issuecomment-1442027241 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADEPTJNP7UGS3RZUNZXOKLDWY6CJTANCNFSM6AAAAAAVFHCPSU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ScottChesworth commented 1 year ago

Dunno whether Control+Space is a default mapping. If it is, I guess they click the Pause button on the transport bar instead.

RDMurray commented 1 year ago

Control+Space, control+upArrow and Control+DownArrow are grabbed by Osara when listviews have focus since #698 was merged. There is an exception for the custom action editor where Control+arrows reorder the list.

jcsteh commented 1 year ago

Hahaha. I forgot that intercepting control+space was actually an OSARA thing. So, we could certainly undo that, but making shift+space do it instead would require a bit more work.