@joaovlg try to follow these steps I'm talking here:

https://retropie.org.uk/forum/topic/2719/keyboard-stopped-working-after-i-played-around-in-the-controller-config-in-rtgui/2