0 Utenti e 1 Visitatore stanno visualizzando questo topic.
include "target.tmh" char flag1; // we create a flag called flag1 int main() { if(Init(&EventHandle)) return 1; flag1=0; //set the flag1 value to 0 at startup of the configuration MapKey(&Joystick, S4, EXEC("flag1=1;")); //set the flag1 to 1 (true) when S4 is pressed MapKeyR(&Joystick, S4, EXEC("flag1=0;")); //set the flag1 to 0 (false) when S4 is released MapKey(&Joystick, S1, EXEC("if(flag1) ActKey(PULSE+KEYON+'a');")); // If flag1 true (=1) press “a” keystroke when S1 is pressed. } int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x);