You do not need to open the keyboard to switch to landscape mode. As long as the app is written properly and it is designed for landscape and portrait mode, all you need to do is tilt the phone sideways. I use many apps that automatically switch to landscape when the phone is tilted with the keyboard retracted. Most apps will always be in landscape mode if the keyboard is out.
Some apps are designed for one orientation only such as many games. They only work in either portrait or landscape only no matter how you tilt the phone or if you open the keyboard.
I think what you may be seeing is the home screens. The home screens are only in portrait when the keyboard is retracted and only in landscape if the keyboard is out.