View Single Post
Old 01-28-2020, 03:05 PM   #931
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 2,189
Default

Quote:
Originally Posted by juliansader View Post
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

Thanks!!


If for example I want to check if "o" is being pressed then the code would be:
Code:
if reaper.JS_VKeys_GetState(scriptStartTime):byte("o") ~= 0 then

Correct?
amagalma is online now   Reply With Quote