a way to make key press combination run procedure?

Started by soulkeeper02468 on Sun, 01/24/2021 - 18:20

Topic category: Help with modding (Java Edition)

Last seen on 17:29, 25. Jan 2021
Joined Apr 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
a way to make key press combination run procedure?
Sun, 01/24/2021 - 18:20

I'm trying to make it so that if i hit a key bind combo(ex:j,k,i) it runs a procedure, or hitting these keys in quick succession: L,k,J, it runs a command is there any possible way of doing this?

Last seen on 00:57, 28. Feb 2021
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You could make procedures…
Sun, 01/24/2021 - 23:42

You could make procedures paired with boolean variables for each key to test when it is pressed. Using a separate procedure, check if all of the keys are pressed (by checking the values of the variables) and then trigger whatever action you need.