Well this might be helpful for you: https://support.apple.com/guide/mac-help/if-your-mac-doesnt-respond-to-key-presses-mchlp1240/mac
open