Wrote keyboard input and shiftout code