Make sure to use a wired USB keyboard connected directly to the computer, otherwise the Keyboard may not properly recognized soon enough.
Also, try using Command + Option + R to access Internet Recovery Mode for the most recent online macOS installer compatible with your Mac. Using just Command + R may only try to access the local recovery partition/volume which may have issues (or the internal drive may have issues).
You can also try using an Option boot to access the Apple boot picker menu, then try using the Command + Option + R keys from the Option Boot Apple boot picker menu.
FYI, the Alt key on a Windows keyboard is the Apple Option key (actually Apple keyboards use to have it Alt/Option).