Cmd+W keydown arm

Click the page once, then press Cmd+W. If the page receives the real keydown, it logs it and registers beforeunload during the keydown.

Navigate away dirty=false armed=false keydown=false