Old 02-09-2017, 09:39 PM   #1
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 4,179
Default Some actions steal focus from ReaScript windows

My radial menu script relies on the user holding a key down to keep the window open, just by constantly checking for that key with gfx.getchar. However, when a user runs certain actions from the menu the focus is given back to Reaper, the script stops seeing keyboard updates, and then Reaper says "hey, you've got this key down!" and runs the script again.

So far the only actions we've found that exhibit this behavior are "Item: Split items at edit cursor (select left)" and its brethren. See this post for a .gif example: http://forum.cockos.com/showpost.php...&postcount=229

Is this a bug, or those actions meant to do that? If it's the latter, I'd love to have some way (maybe an extra flag for Main_OnCommand?) to keep my window in focus.

Cheers.
Lokasenna is offline   Reply With Quote
Old 02-10-2017, 01:41 AM   #2
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 1,714
Default

well I thought its something else but it seems lot of actions do this (found by accident, it opened something that should not be opened unless the button was pressed again).

http://forum.cockos.com/showthread.php?t=187284
I've opened this FR not long ago for Reaper windows do not steel focus when called from reascript but actually lots of them reset keyboard state like Lokasenna found.

This does not happen when calling other scripts from a script,but only reaper stuff
__________________
https://github.com/GoranKovac - I absolutely don't get it

Last edited by Sexan; 02-10-2017 at 01:55 AM.
Sexan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:24 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.