Old 07-23-2017, 06:07 AM   #1
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default Is it possible to detect modifiers when doing action?

I would like to check if any Key is being pressed when doing an action so The script makes decicions based on iT.

If shift being pressed do something
Else do other thing

Thanks

Last edited by deeb; 07-23-2017 at 06:10 AM. Reason: typo
deeb is offline   Reply With Quote
Old 07-23-2017, 07:55 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

You will need separate scripts (that you can assign different shortcuts) for the different "modes" you want to have for your actions. The scripts to be assigned to the different shortcuts can of course use some common code in a separate script file.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 07-23-2017, 08:07 AM   #3
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Quote:
Originally Posted by Xenakios View Post
You will need separate scripts (that you can assign different shortcuts) for the different "modes" you want to have for your actions. The scripts to be assigned to the different shortcuts can of course use some common code in a separate script file.
ok Xenakios! i see, pitty because that will never work with clicking on same toolbar "icon" with different modifiers, which would be perfect. Would annoy you?
Anyway, back to what it is: your idea will work too, and i will have this in mind from now on! i never thought "that way".
Thank you
deeb is offline   Reply With Quote
Old 07-23-2017, 09:06 AM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

There is the variable "gfx.mouse_cap" that has the mouse button and keyboard modifier states but I doubt that will work if the script doesn't have its own GUI.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 07-23-2017, 11:30 AM   #5
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Quote:
Originally Posted by Xenakios View Post
There is the variable "gfx.mouse_cap" that has the mouse button and keyboard modifier states but I doubt that will work if the script doesn't have its own GUI.
nice nice! will try it ! thanks
deeb 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 01:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.