Not sure about your question - "sideways" is the same as "landscape".
If you mean how to switch during runtime:
- Switch to previous layout orientation (for example, portrait, landscape):
KEYPAD_7, Ctrl + F11
- Switch to next layout orientation (for example, portrait, landscape):
KEYPAD_9, Ctrl + F12
From docs.