Check device orientation to determinate the height of keyboard

Check device orientation to determinate the height of keyboard