Accidentally switching hotbar slots whilst scrolling through an inventory or using the mouse wheel can be frustrating. ScrollLock provides a simple way to toggle hotbar scrolling on and off.
Press I to toggle the lock. When enabled, scrolling with the mouse wheel will no longer change the selected hotbar slot. When disabled, hotbar scrolling works as normal.