Disable key

Hello everyone, a big greeting, creators. well my goal this time is to make the player after entering a trigger not be able to use a specific key, that is to say that after entering a trigger he cannot use a key (example R)

I would like you to help me with that because I have been trying strangely