fix keyboard issues with rotation and panning. fix #232. close #36. cc: #172