BindAid – Input Handler

Input Binding Manager for Project Zomboid which provides optimizations for keyboard input events and additional Mouse button support with optional keyboard emulation.
- Keyboard Input Optimization
- Modifier key Support (Currently for Modders. Now Syncs in MP!)
- Additional Mouse Button Support
- Mouse Button Keyboard Emulation
- Autohide the Mouse Cursor
- Easy API for Modders!
By default, Left Control is set to be the "Aim" key with the keyboard. I believe the key can be put to better use, and intend to replace the key’s usage to be a Modifier. I HIGHLY RECOMMEND that you unset the default "Aim" key to nothing (you have Right Click), or change the Modifier key to something else.
For now the Modifier key is mostly a Modder’s tool, but in the future I plan on allowing vanilla keybindings to be set with the Modifier.
Mod Options is REQUIRED to configure this mod; however, it is not a requirement for its operation. When your first install this mod, please take some time to set up its configuration based on your own needs using Mod Options. Further information on the available options is available below.
When Mod Options is NOT enabled for a save, your configuration will still be read and applied. THIS MEANS Server Owners can safely include this mod without also requiring Mod Options, and user configuration will still be used.
A full breakdown is available here: BindAid’s Keyboard Input Optimization – What It Be, and How It Do
In summary, there are 4 general events that are triggered for input handling, and each event will call multiple functions for each keypress.
This occurs for ALL keypresses, whether they have actions bound or not. Multiple keypresses multiply the number of functions called per frame. This is not an issue for most people, but I have organized and optimized how this is handled so only 1 function is called during the event, which then calls the keypress if applicable.
This feature can be disabled in the Mod Options configuration. If changed while in-game, a restart is required.
I have created this in a way that should have maximum compatibility. If you have any issues with a vanilla key not being triggered, I would recommend disabling this optimization and letting me know. I cannot fix all mod compatibility, and some may require changes by the Modders. For Modders, please see: BindAid – Modder’s Resource
- Mods that add their own NEW keys are not affected.
- Mods that modify vanilla functions for keypresses will be compatible as long as their changes are made no later than OnGameStart, and any modifications are forwarded.
That’s right, BindAid provides support for additional Mouse Buttons! Project Zomboid provides support for an additional 6 Mouse Buttons, but only has events bound on Left and Right Click. I have added Events to handle more Mouse Buttons!
You will need to select the number of Mouse Buttons that you would like to have support for in the Mod Options. A restart of the game is required after you have made this change.
The Mouse Buttons have 2 different modes: Mouse Button Events (default) and Keyboard Emulation. An option is available to enable both methods to run as well.
When Mouse Button Events are in use, the additional Mouse Buttons are handled similarly to keybind events. Modders can hook into these events to allow additional actions to be done on a Mouse Button Press/Hold/Release. Please see: BindAid – Modder’s Resource
THIS MEANS, BY DEFAULT, MOUSE BUTTONS PERFORM NO NEW ACTIONS! MODDERS MUST ADD SUPPORT FOR THIS!
New in the "Key Bindings" Options Tab will be the Mouse Buttons that are supported under the "BindAid" section, each set to a key bind of "None". Setting a Key here on a Mouse Button will instead cause an emulated Keypress to be done instead of the Mouse Event! For example, you can bind "Reload" to the Middle Mouse Button.
NOTE!!! The Emulated Keypress is ONLY done in Lua, so it will not trigger functions defined in Java. This means you cannot assign a key to "Move Forward" or something like that; it won’t work. Actions such as Reloading, Shout/Emote, and many others are available, as well as new keybinds added by other mods (the main target).
Workshop ID: 2945066057
Mod ID: BindAid