Add cursor locking to ToolBox.