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

Started by TumbleElf on

Topic category: Help with modding (Java Edition)

Last seen on 09:35, 1. Aug 2023
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?

Last seen on 05:29, 31. Jan 2022
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.