Connexion rapide:  

Forum: General Discussion

Sujet Mapping 2 functions to 1 button - Press&Hold / Press&Release?

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

Is it possible to map two different functions to one button, which are activated through different actions? Eg. If you press and release the button, it will activate function 1. But if you press and hold the button, it will activate function 2 until the button is released.
 

Posté Sat 26 Jul 14 @ 8:22 am
holding : execute different actions depending if the key is pressed for a long time or not: 'holding ? automix : mix_now'. you can specify the time ('holding 1000ms'), by default it's 500ms.
 

Posté Sat 26 Jul 14 @ 10:27 am
Great I'll test that out. And how about holding a button and rotating a knob at the same time? Eg So I could hold a button to activate a phaser, then rotate the knob to alter its filtering. Then when I release the button, the phaser deactivates, and the button and knob can then be used for their original functions?
 

Posté Sat 26 Jul 14 @ 11:10 am
locoDogPRO InfinityModeratorMember since 2013
For the dial
' effect_active 'phaser' ? effect_slider 'phaser' X : other mapping '
Where X equals the desired slider number.
Although I'm assuming you are a keyboard user (due to your Home user status) and to have holding scripts (or repeat scripts) to work you have to set up filter keys in Windows control panel ease of access.
 

Posté Sat 26 Jul 14 @ 11:50 am
Using a keyboard at the mo, but would like to understand it for future use with a controller. So locodog, it sounds like you are explaining mapping just the dial? What I'm asking is how to activate a new dial function only when another button is held down.
 

Posté Sat 26 Jul 14 @ 1:53 pm
PachNPRO InfinityMember since 2009
The mapping loco suggested for the dial is exactly doing what you want.

It checks if your phaser effect is active. If that's the case its executing the "effect_slider 'phaser' X" action.
Otherwise it's executing "other mapping".

For you button to activate the phaser you could use this mapping:

effect_active 'phaser' while_pressed

I think that action is self-explanatory.
 

Posté Tue 29 Jul 14 @ 6:53 am


(Les anciens sujets et forums sont automatiquement fermés)