Disabling keyboard autorotation

Hello.

This has probably been answered many times but I couldn’t find it among other similar threads that in the end don’t answer my question.

I’m using the iPhone keyboard, and I’d like it to be in one rotation always (Landscape Left). However, the documentation says I can’t set the rotation, only specify which orientations it should autorotate to. Like this:

iPhoneKeyboard.autorotateToLandscapeLeft = true;
iPhoneKeyboard.autorotateToLandscapeRight = false;
iPhoneKeyboard.autorotateToPortrait = false;
iPhoneKeyboard.autorotateToPortraitUpsideDown = false;

However, sometimes the black frames still appear. I think this is because the keyboard is set at something other than Landscape Left in the beginning, and then autorotate to Landscape Left at the first opportunity. This causes black frames which is not desired.

Is there any way around it?

I assume you are putting that code in function Awake?

Try adding:

iPhoneSettings.screenOrientation = iPhoneScreenOrientation.LandscapeLeft;