With a bag equipped and tool-type items in the two green squares in the lower left, you can shift+scroll while holding a tool to swap among them. Apparently, you don't want to do it too fast. Have any item next to a tool. While the item is held, quickly scroll. All the affected tools will be replaced by the item.
Crafting an item in the backpack and closing it after, then reopening it, drops the crafting items, but allows you to take the crafted item you intended to make.
With a bag equipped and tool-type items in the two green squares in the lower left, you can shift+scroll while holding a tool to swap among them. Apparently, you don't want to do it too fast. Have any item next to a tool. While the item is held, quickly scroll. All the affected tools will be replaced by the item.