// find the first responder
IOSNativeTextField firstResponder = findFirstResponder();
if (firstResponder == null) return; // it's not a field we're managing, bail
// figure out how we need to transform the game view
SizeF size = ((NSValue) nf.get_UserInfo().get_Item(
UIKeyboard.get_FrameBeginUserInfoKey())).get_RectangleFValue().get_Size();
RectangleF fieldFrame = firstResponder.getView().get_Frame();
// oddly, the size given for keyboard dimensions is portrait, always.
float targetOffset = -size.get_Width() +
_overlay.get_Bounds().get_Height() - fieldFrame.get_Bottom();
// give it a little padding, and make sure we never move the game view down,
// also make sure we never move the bottom of the game view past the top of the
// keyboard
targetOffset = Math.max(Math.min(targetOffset - 10, 0), -size.get_Width());
PointF target = new PointF(0, targetOffset);
target = _overlay.get_Transform().TransformPoint(target);
// update and set the transform on the game view
UIView gameView = _overlay.get_Superview();