To do macro with keys

Gtuner IV general support. Operation, questions, updates, feature request.

To do macro with keys

Postby abbasbj » Tue Nov 17, 2020 1:30 pm

While holding a key, I want it to do the macro when you press a different key. What should I write code for this?
User avatar
abbasbj
First Sergeant
First Sergeant
 
Posts: 58
Joined: Sat Feb 01, 2020 10:16 pm

Re: To do macro with keys

Postby Mad » Tue Nov 17, 2020 7:00 pm

key_status() https://www.consoletuner.com/wiki/index ... key_status
Code: Select all
if(key_status(KEY_A)) {
    if(key_status(KEY_B)) {
        // do stuff
    }
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: To do macro with keys

Postby abbasbj » Tue Nov 17, 2020 8:25 pm

not the keyboard. gamepad
Code: Select all
main {
 
    if(get_val(BUTTON_2)) {
        if(event_active(BUTTON_4)) {
        macro_run("Example.gmk");
        }
}

I tried to simulate. is it correct?
User avatar
abbasbj
First Sergeant
First Sergeant
 
Posts: 58
Joined: Sat Feb 01, 2020 10:16 pm

Re: To do macro with keys

Postby Mad » Wed Nov 18, 2020 3:48 am

abbasbj wrote:not the keyboard. gamepad
I tried to simulate. is it correct?

Yes this is correct. :smile0517:
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 66 guests

cron