Matts / MacroKey

A mod that allows you to bind keys
17 stars 10 forks source link

Cant use Mouse 4/5 to bind to? #68

Open TomLewis opened 4 years ago

TomLewis commented 4 years ago

Using 1.12.2, Discord links broken in website.

How do I bind mouse 4/5 buttons?

Matts commented 2 years ago

Currently, MacroKey only supports key inputs that are generally recognised. Too bad extra mouse buttons are usually caught by the driver software of your mouse. I am not currently looking to actively support this, but it is certainly worth a little reserach

TomLewis commented 2 years ago

Sounds good! lets hope it works, I have used https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1275039-macro-keybind-mod for years that supports it, but they never updated past 1.12.2, so theres a gap in the Macro market for minecraft.

Matts commented 2 years ago

As a hack/workaround to use until something supports it officially, is to, if your mouse driver supports it, map keys 3+4 to a keyboard character that is not that frequently used (right control or something) and then map that ingame to the macro.

TomLewis commented 2 years ago

As a hack/workaround to use until something supports it officially, is to, if your mouse driver supports it, map keys 3+4 to a keyboard character that is not that frequently used (right control or something) and then map that ingame to the macro.

Im actually still on 1.12.2 for my server, I was testing mods for when we upgrade because Im reliant on 4 & 5 for WE for //pos1 and //pos2. Thanks for the tip.

Matts commented 2 years ago

After looking around found that the Forge's InputEvent.RawMouseEvent completely supports GLFW, had a working example in the pipeline where I could detect 4 and 5, now just the actual functional logic and UI behind it. Concept can be found here #75

Matts commented 2 years ago

Issue behind UI what I found is that mouse buttons are mapped differently than keyboard buttons, so have to distinguish the input controller within a macro (and on execution of the macro). Also should probably implement something that uses the translations to show the button key instead of printing the raw GLFW key