I know it works but not like that.
I have a slot free and a shotgun in my hand. In front of me is an assault rifle. I want to pick up the assault rifle, but it's not supposed to go into the free slot, but go instead of the shotgun. What should I do? I play on PC.
That will not do. Your inventory must be full, only then will the item be exchanged.