View Single Post
Old 01-28-2020, 10:26 AM   #930
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by amagalma View Post
How to know if particular keys are being held down during defer?
You can either use JS_VKeys_GetState (which is similar to the Win32 function GetKeyboardState) or, for modifier keys only, JS_Mouse_GetState:

Code:
if reaper.JS_VKeys_GetState(scriptStartTime):byte(x) ~= 0 then ...
or

Code:
if reaper.JS_Mouse_GetState(24) == 24 then ... -- 8:Shift, 16:Alt
juliansader is offline   Reply With Quote