Mods / Mouse 4 and 5

Category: #QoL #Tweak
Author: Phischermen
Side: Client
Created: Dec 30th 2023 at 11:29 PM
Last modified: May 20th at 5:03 PM
Downloads: 533
Follow Unfollow 20

Latest file for v1.19.8:
mouse4and5_2.0.0.zip 1-click install


Allows you to use mouse buttons 4 and 5 to perform 'shift' and 'ctrl' click actions. It also allows you to sprint and sneak using those buttons.

This mod is configurable; you can find the config file "mouse4and5.json"' in AppData/Roaming/VintagestoryData/ModConfig.

The options are:

NoHud: Disable the HUD. Default is false.

ToggleHold: Rather than holding mouse 4 or 5, simply press and the game will act as if you are holding the button down. Press again to release. Default is true.

Mouse4Sprint: Set to true if you want your character to sprint while holding mouse 4. Default is true.

Mouse5Sneak: Set to true if you want your character to sneak while holding mouse 5. Default is true.

Note: You will likely want to disable "Toggle Sprint" under your control settings, but please try this at least once; turn that setting on, switch to 3rd person, hold mouse 4, and walk around. It's funny :)

Note: This mod makes use of the hot key system. Around 1.19, it was possible to rebind the mouse controls since they were added as hotkeys. This addition is what broke the mod - I could no longer listen to raw mouse input anymore! To get around the issue I added two new hot keys for mouse 4 and mouse 5 - check out the source if you want to see how I did it. They will appear in the mouse controls settings and can even be rebound! I don't think the developers are ready to support this yet because the gui clips the hot keys lol but it might be possible to rebind the controls manually.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v2.0.0 272 May 20th at 5:03 PM Show mouse4and5_2.0.0.zip Install now
v1.0.0 261 Dec 30th 2023 at 11:30 PM Show mouse4and5_1.0.0.zip Install now

6 Comments (oldest first | newest first)

💬 umm, Sep 29th at 3:54 AM

Gross AI picture!

💬 PhischermenAuthor, Jan 1st at 6:01 PM

Phoenicius I'm afraid not! This mod only adds alternative controls to shift-click, ctrl-click, sprint, and sneak.

💬 Phoenicius, Jan 1st at 4:33 PM

So can I use this to close menus that I have open? Similar to how you might use mouse 4 / 5 when navigating windows to go back and forth between folders?

💬 rayray, Dec 31st 2023 at 12:15 PM

omg thank you , have not tried hope it works , but thank you 

💬 PhischermenAuthor, Dec 31st 2023 at 2:12 AM

WinstonWhitetail Your request is doable, but I would use a different approach than I use in this mod. The challenge is that the game controls are hardcoded to be bound to keys, and keybindings don't accept mouse input. Another obstacle is that clicking on the GUI could break, or I could only get it to work after joining a world (mod is loaded) but not after you exit.

Maybe you might find what you looking for with software that remaps mouse buttons?

Edit 5/21/2024: It appears that it is now possible to rebind the games controls to mouse buttons! That includes "shift-click" and "ctrl-click" which means one could technically just rebind those to mouse 4 and 5 instead of downloading this mod 😅 "Toggle Hold" is still a unique feature to my mod though.

💬 WinstonWhitetail, Dec 31st 2023 at 1:19 AM

any chance you can make it so we can change the mouse 1 and 2 to use either of these as well? not sure how hardcoded it is in the game

(edit comment delete)