disabling some keys

Good day, I want to disable some keys when the other party connects to you. Is this possible?