|
|
Thread Tools | Display Modes |
04-25-2019, 01:51 PM | #1 |
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
"accelerator" should be ahead of MIDI editor in keyboard processing queue (FIXED)
The "accelerator" function gets an extension a place in the keyboard processing queue:
(Quoting from reaper_plugin.h) Code:
/* ** accelerator_register_t allows you to register ("accelerator") a record which lets you get a place in the ** keyboard processing queue. */ typedef struct accelerator_register_t { // translateAccel returns: // 0 if not our window, // 1 to eat the keystroke, // -1 to pass it on to the window, // -666 to force it to the main window's accel table (with the exception of ESC) int (*translateAccel)(MSG *msg, accelerator_register_t *ctx); bool isLocal; // must be TRUE, now (false is no longer supported, heh) void *user; } accelerator_register_t; * The script can detect a keystroke and terminate itself, thereby skipping the strange "ReaScript task control" dialog that confuses new users. * Alternatively, instead of starting and stopping the script by two separate keystrokes, the script can run while the shortcut key is held down, and terminate when the key is released. Many users find this more natural, and more similar to REAPER's native mouse modifier actions. * The script can be controlled by keystrokes, without triggering action shortcuts. For example, ESC can terminate the script, instead of closing the MIDI editor. Unfortunately, the MIDI editor and inline editor appear to jump the queue when they are focused, inserting themselves ahead of the extension's accelerator in the keyboard processing queue. The accelerator can therefore not eat keystrokes that go to the these windows, and deferred scripts cannot take advantage of the above-mentioned applications.
__________________
Scripts for advanced MIDI editing | LFO Tool for MIDI editor and envelopes Video thumbnail scripts | ReaScriptAPI extension Last edited by juliansader; 04-25-2019 at 02:33 PM. |
04-25-2019, 08:41 PM | #2 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,117
|
If you add the accelerator via "<accelerator" rather than "accelerator" it will place it at the front of the queue.
|
05-07-2019, 02:36 PM | #3 |
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Thanks!
"<accelerator" works well for the main MIDI editor and all dialog boxes that I tested. However, the plucky little inline MIDI editor is still ahead in the queue and is unaffected by "<accelerator". |
05-09-2019, 08:32 AM | #4 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,117
|
Hmm yeah. I might be able to fix that (unsure what it will break...).
Last edited by Justin; 05-09-2019 at 08:37 AM. |
Thread Tools | |
Display Modes | |
|
|