That's good news in the fact the keyboard itself is probably ok, which means you ought to be able to start that Mac in Recovery mode.
To do that, please follow the instructions under How to start up from macOS Recovery in About macOS Recovery on Intel-based Mac computers - Apple Support. Invoking Recovery Mode requires that you press and hold the ⌘ and R keys with two fingers, while turning it on with a third finger, so obviously the keyboard has to work.
- If you can get your Mac to start in Recovery mode, determine if you can perform the rest of the instructions in that document.
- If you are unable to get your Mac to start in Recovery mode, then the ability to continue troubleshooting on your own becomes limited and may not be possible. Perhaps the keyboard really isn't working.