Adjust keyboard rect to local coordinates to fix in landscape orientation