The keyboard is in the form of a subzone of a new window, which is added when it appears. The search is a bit hacky and fragile (it will require verification in new versions of iOS, as it was before), but it works, and it is allowed (I do just that for night mode in the application located in the application store).
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
This is done inside the method that responds to the UIKeyboardDidShowNotification object. I have not tried this on an iPad, this is just the iPhone code.
The mask view, as you say, is a simple view with a black background and some transparency. You can also use the warning keyboard style, which gives a black space between the keys.
This method, unfortunately, does not allow you to blink a little buttons (large keys that appear when you press a key).
source share