How do I bind a keybind element to the middle mouse button?

Started by TumbleElf on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I bind a keybind element to the middle mouse button?

You know how you press the scroll wheel to select a block in creative? How would I bind something else to that with the Keybind Element?

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Apparently mcreator…
Tue, 01/21/2020 - 05:03

Apparently mcreator currently doesn't have this implemented (or any mouse related functions).

You need to subscribe to InputEvent.MouseInputEvent to trigger events on mouse input. If you just want to query mouse status, you can import org.lwjgl.input.Mouse and use their mouse functions directly.