Adding support for rotations and keyboard. Not finished yet.