This will happen if your keyboard is even slightly open. Slide it open and close it, just to make sure that's not the problem.
Also, go into Preferences, Behavior Settings and see if you have "Enable Auto-Rotation" turned on. If you do, turn it off to see if that helps.