Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyboard shortcut mapping source option #358

Closed
daniboyle opened this issue May 7, 2021 · 8 comments
Closed

Add keyboard shortcut mapping source option #358

daniboyle opened this issue May 7, 2021 · 8 comments
Labels
enhancement New feature or request high priority realearn Related to ReaLearn

Comments

@daniboyle
Copy link

I currently use loopMIDI and GlovePie with ReaLearn to assign MIDI CC 80 and 81 to Numpad- and Numpad+ in order to control a talkback mic in momentary and toggle modes (like on a dedicated talkback mic) without using an external controller. Such native feature would be very handy, any 'MIDI CC/OSC only' action could be triggered from keyboard with different characters.

@helgoboss helgoboss added the enhancement New feature or request label May 10, 2021
@helgoboss
Copy link
Owner

Working on it.

@daniboyle
Copy link
Author

Thanks, I just thought about this today :)

helgoboss added a commit that referenced this issue Mar 24, 2022
by sharing main processors between accelerator and control surface
helgoboss added a commit that referenced this issue Mar 24, 2022
(once mutably and once immutably)
@helgoboss
Copy link
Owner

Nice. I can see how this could become a quite powerful keyboard mapping tool, combined with all the existing ReaLearn features (conditional activation, MIDI/OSC targets, ...). I'll also make the "Let matched/unmatched events through" checkboxes work. That makes it easy to prevent REAPER from receiving any key presses that are already processed by ReaLearn ... or one could even shut REAPER out totally, could be interesting for certain live scenarios where you only want a handful of keys to have an effect.

@helgoboss
Copy link
Owner

Could be that on macOS it's not possible to use modifer keys alone to trigger something (e.g. just the Command key). That would be quite interesting because then one could use ReaLearn's own modifier system (conditional activation) to build flexible setups, or make it possible to simulate hardware controllers and use that with existing generic main presets. I'll look into it. In Windows that's possible.

@helgoboss
Copy link
Owner

@daniboyle You were asking about global hotkeys in the forum (listening to keys even if REAPER is not focused).

Good news: At least on macOS, it's possible without much effort to listen to single (non-modifier) key presses without the need to combine it with a modifier. And I guess that's possible also on Windows, but need to check it.

Bad news: At least on macOS, listening to the key-up event (key released) is not that trivial. It's probably possible somehow but it needs more effort. Not being able to receive the key-up event is a bit unfortunate because it doesn't let you use some of the nice ReaLearn features. It would be unsatisfying to users to see things working while in REAPER and see them break - but only half break - as soon as focusing another window.

I guess I will proceed like this:

  1. Take care of making the keyboard source work cleanly within REAPER (including save/load). Release it (that's already a lot of benefit).
  2. Provide a very experimental option to make keyboard input global (= work also if REAPER is not focused). This option must be enabled globally for all ReaLearn instances, it's not the default. Also: I think it's best if users are required to manually re-enable this option whenever they restart REAPER. Otherwise the user might wonder after a long time of not having used REAPER why his keys are not working anymore.
  3. Long-term: Improve the global keyboard input mode, step by step, OS by OS ... until it's out of the experimental stage.

@daniboyle
Copy link
Author

Thanks and keep up the great job!

helgoboss added a commit that referenced this issue Apr 3, 2022
helgoboss added a commit that referenced this issue Apr 4, 2022
helgoboss added a commit that referenced this issue Apr 4, 2022
@helgoboss
Copy link
Owner

In upcoming 1.13.0-pre.2, step 1 (making it work cleanly when REAPER is the focused window, cross-platform) is implemented. That should be enough for most use cases.

@daniboyle If you really need global hotkeys, open another ticket. I thought about it. This will for sure take much longer to get right, especially cross-platform. I probably won't bother unless users are willing to sponsor a development in this direction.

@helgoboss
Copy link
Owner

BTW, it turned out to be possible to catch single modifier key presses cross-platform (not just combinations)! So I have decided to not even allow combinations, just single key presses. One can use ReaLearn's conditional activation to implement combinations manually. The beauty of this is the uniformity with other types of input (OSC and MIDI), which also don't allow combinations. The result: This encourages creating presets that work across different types of input.

I might unlock the possibility of combined keystrokes in a future release, but not sure yet.

helgoboss added a commit that referenced this issue Apr 4, 2022
@helgoboss helgoboss added the realearn Related to ReaLearn label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority realearn Related to ReaLearn
Projects
None yet
Development

No branches or pull requests

2 participants