In the first two hours, Keenan writes 800 words because 400*2=<<400*2=800>>800.
After that, she still needs to write 400 words because 1200-800=<<1200-800=400>>400.
Since she writes 200 words per hour, she will take 2 hours to write the last 400 words because 400/200=<<400/200=2>>2.
Thus, she needs to start 4 hours before the deadline because 2+2=<<4=4>>4.
#### 4