I'm noob in this thing so I don't exactly know how to ask this.

so there is this line in a phyton script that responsible for setting key combination that will trigger the 'script', in this case is this one:

kmi = km.keymap_items.new(GPCRot.bl_idname, 'LEFTMOUSE', 'PRESS', ctrl=True, shift=False, alt=True)

so the script run when I press ctrl+alt+lmb, so from there I understand that the 'press' on the line above is responsible for the click behaviour. So is it possible to have other type of click('press'), like for example adding hold function so that the script would continue to run until I release the key?

thank you.


Enum as below:


You can find the reference here: KeyMapItens

If you want to simulate holdup method, use the 'PRESS' and 'RELEASE' with if stament. Or maybe 'CLICK_DRAG'

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.