How do I switch places with my rook and king? is there a certain keyboard command?
No command on the keyboard. When playing a game on Chess.com and you would like to castle you should move your King two squares towards the side you want to castle and if that castling move is legal then the corresponding Rook will automatically move to the appropriate place and the castling move will be complete.
It might be a little obscure for Ledder... "switch[ing] places with my rook and king" is called castling. Moving the king two squares to either side performs the castling process like Patzer24 said.
There are several rules that define whether or not "castling" is legal, refer here:
Thanks for the info!