Onscreen keyboard settings
On the Application tab on the Home screen, select Settings > Language & input.
Adjust the onscreen keyboard orientation
Simply turn your phone sideways or upright to adjust the Onscreen Keyboard orientation. You can also adjust it by changing the settings (go to Settings > Display > When device is rotated > Rotate the contents of the screen).