


Client-side BepInEx 5 plugin for Valheim that keeps the hidden mouse cursor locked during gameplay. It unlocks the cursor when UI needs it, including the main menu, pause menu, inventory, chat, console, text input, and when the game window is not focused.
build.ps1.dist/ValheimCursorLockFix-1.0.0.zip.After the first launch, edit the generated config file:
BepInEx/config/ua.gyrocopter.valheim.cursorlockfix.cfg
Available options:
EnableFix - enables or disables the fix.ForceLockInGameplay - forces Cursor.lockState = Locked and hides the cursor during gameplay.UnlockInMenus - unlocks and shows the cursor in menus, inventory, chat, console, text input, or when the window is inactive.ToggleKey - default F8.DebugLogging - enables extra log messages.Press F8 in game to toggle the fix on or off. When disabled, the plugin releases the cursor and stops forcing the gameplay lock.
EnableFix and ForceLockInGameplay are both true.DebugLogging = true, reproduce the issue, and check the BepInEx log for the detected cursor state.