how can I assign a gesture to one of the Command/Option/Apple keys (press and hold)

Hello,

I would like to be able to zoom in and out my whole screen using the zoom feature of Mac OS. To do this, I press and hold (opt or command or control) as available from the setting. Then I use my 5 button mouse scroll wheel to zoom in and out. Once I release the command key in my case, the screen stops zooming.

How can I do this with BetterTouch using only my mouse and the gesture feature? Is it possible to assign a gesture to say the command key, and then use the scroll wheel to zoom in and out? Use the same gesture to release the command key.

Is that possible, or is there a built in feature like this to keep a key pressed (like press Opt key and keep it pressed)?

I'm not sure if this will work, but you can try the predefined actions cmd down / up. If you want to use the same trigger (gesture) for both actions, then choose a cycle action.

BTT has an undocumented way to zoom the screen in/out. It is not as smooth as with the scroll based zoom, but maybe it can help you.

It can be triggered using the "Run Real Javascript " action with this code:

Zoom In

(async () => {
BTTActions.uaZoomIn()
returnToBTT('done');
})()

Zoom Out

(async () => {
BTTActions.uaZoomOut()
returnToBTT('done');
})()

If you only want to trigger this while holding some specific mouse button, you can use the advanced trigger conditions: