|
|
|
04-16-2021, 05:23 AM
|
#1
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Mouse_cap behaviour
THis has tripped me up:
In a JSFX, if you press Shift (or Ctrl or Alt) mouse_cap stays at 0. It only changes to a value when a mouse button is clicked
In a .lua or .eel2 script, if you press Shift (or Ctrl or Alt) gfx.mouse_cap changes to 8 (or 4 or 16) immediately, then changes again when the mouse button is clicked.
So I cannot use tests such as if gfx.mouse_cap > 0 then ... as a sole Shift would pass that test, before any mouse button is clicked.
I wonder, is this by design?
Such tests need to change to check the last 2 bits of gfx.mouse_cap which indicate which mouse button was pressed. (I have also noticed that pressing my mouse-wheel sets gfx.mouse_cap to 64)
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
04-16-2021, 05:30 AM
|
#2
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,750
|
I think that the behavior depends on whether the script or JSFX contains a gfx_getchar() call, not on whether it's a script or JSFX.
|
|
|
04-16-2021, 07:16 AM
|
#3
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by schwa
I think that the behavior depends on whether the script or JSFX contains a gfx_getchar() call, not on whether it's a script or JSFX.
|
Could you add a note to the API-docs and to
http://reaper.fm/sdk/js/js.php
about that? Currently this fine detail isn't really clear and could easily cause confusion.
|
|
|
04-17-2021, 05:12 AM
|
#4
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Quote:
Originally Posted by schwa
I think that the behavior depends on whether the script or JSFX contains a gfx_getchar() call, not on whether it's a script or JSFX.
|
That could be it. I am curious, why would that difference in behaviour be useful?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
07-09-2021, 06:43 AM
|
#5
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,721
|
Quote:
Originally Posted by DarkStar
That could be it. I am curious, why would that difference in behaviour be useful?
|
Legacy support for old scripts
|
|
|
07-09-2021, 07:09 AM
|
#6
|
Human being with feelings
Join Date: Jun 2019
Posts: 2,872
|
I am no expert in jsfx but there is one behavior that I find very annoying and affects almost every jsfx with a GUI: when I turn a knob and press the space bar to start playback the knob stops turning. I have to release the mouse and click again fo continue tweaking. Is this in any way related to what is being discussed here? I hope it can be addressed because this makes tweaking sounds while retriggering them with the space bar very tedious.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:33 PM.
|