If it's genuinely dead in-game, the culprit is usually the keyboard itself or a driver issue rather than TF2 — the game doesn't lock out input on its own. Test the same keys in a text field or another application to confirm which it is.
Common fixes: unplug and reconnect the keyboard, check that Steam's overlay isn't intercepting input, verify the game files through Steam, and delete your config if a stray bind is swallowing keys. A stuck key or a USB power-management setting sleeping the port are both worth ruling out.