Wrote keyboard input and interrupt code