Use the arrow keys to apply torque. Use the up key to apply thrust in whatever direction you are facing. r_velocity is your rotational velocity; x and y are obvious; heading is your degree tilt in Cartesian.
Took a physics class this year. These are a few things I learned.