When an player approaches an object, remove it from the keyboard with a key

Hi, I want to remove an object from the keyboard with a button when the game character approaches, does anyone know?

I have a lesson and I am in a little hurry