I had this three times in a row today. I join a friend's server via the steam-overlay while already in the main menu of DayZ Standalone.
Once I'm in the server, my controls freeze up and I can't move either with keys or mouse, and also not access any menu since the ESC key also doesn't work.
The only way I can get out is by shutting down the game.
After several attempts I joined my friend's server directly from Steam without having started DayZ. This solved the problem.