Enable [key] only in locked patchers?

Sep 28, 2010 at 11:52am

Enable [key] only in locked patchers?

This is probably very simple, but I can’t seem to find the answer even after searching the forum.

How can I disable the [key] object when a patcher is in edit mode?

I am mapping the m key to an action and I don’t want this action to happen every time I add a message box when tweaking the patch.

I could remap to shift-m, or an unused character, but I want to use single keys that related to the action.

#52504
Sep 28, 2010 at 2:50pm

Hello EMV,

if you have a Macintosh and are not afraid by beta testing my [Quebec] external i tweaked quickly for fun few minutes ago ;-)

Attachments:
  1. Q.zip
#188820
Sep 28, 2010 at 5:34pm

here’s some javascript that allows bangs to be passed through only when the patcher is locked:

function bang() {
    if (this.patcher.locked) {
        outlet(0, "bang");
    }
}
#188821
Sep 29, 2010 at 7:33am

Thanks pizza olives and Brian Gruber for the suggestions!

I develop my patches on a Mac, but they need to run on windows too so I’ll go with the javascript solution.

I imagine an external would be the nicest solution because it would be more efficient and faster, but then again this action doesn’t happen so often and doesn’t deal with lots of data.

#188822

You must be logged in to reply to this topic.