Forums > MaxMSP

Enable [key] only in locked patchers?

Sep 28 2010 | 11:52 am

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.

Sep 28 2010 | 5:34 pm

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");

Sep 29 2010 | 7:33 am

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.

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > MaxMSP