key was so taken by the bombardment he witnessed from the deck of the ship that night -lrb- the british lobbed more than 1,800 bombs and rockets into and around the fort -rrb- and he was so stirred upon seeing the american flag still flying over the fort at daybreak , that he hastily composed several verses of a poem on the back of a letter or an envelope he found in his pocket. ;