This happens to me as well. I haven't yet figured out how to reliably duplicate it, but it happens often enough to be frustrating. The only way out is to "cmd-Q" and restart the game.
Some notes:
I've only noticed it happening when I have the orbital info active. That could be a red herring, though, since I have that mode open far more often than the others.
The F* keys works as usual (I can hide UI, show mission stats, etc). Other keys have no effect (including escape, z, x, shift, control, wasd, t, etc.).
The other tabs for the flight modes (the ones that let you switch between staging view, orbital info, view, etc.) are darkened and disabled; clicking them has no effect.
The game continues to play -- engines continue to burn, craft continue on their preexisting trajectories, etc. -- but no input is recognized.
I've attached a screenshot from the latest incident. I was in the middle of maneuvering the rocket, pressing the usual keys (WASD, shift, control, arrow keys), but I don't recall if there was a particular combination of keys that caused it. You can see the tabs in the lower left are darkened. You can see that the probe has a network connection and ought to be controllable. The electricity resource is not pictured (because the UI at this point was unresponsive) but the probe had plenty of electricity.
If/when it happens again I'll try to post more information to help diagnose. This is really getting frustrating.
Thank you!
- Jamis
Edit: this is in KSP 1.7.1, on macos 10.14.5, on a 2015-era 15" MacBook Pro with retina display.