Hi Richard,
Thanks for the quick reply.
From whatever little I know so far of window management, I've come to following conclusions:
1. Alt+F4 is global key combination for closing a window, this event bubbles all the way up to the OS. (On my OS I know how to disable this key combination, or any kind of key combination from closing the window altogether).
2. Ctrl+W, Ctrl+F4 are application specific. These keypresses are handled by application and do not bubble up to OS.
I've disabled Alt+F4 on my system, guess what happens. Firefox does not get closed by using this key combination, on the other hand Google Chrome and Opera does gets closed. It seems Firefox defers the Alt+F4 key combination to OS but apparently Chrome and Opera do not. Hence my question is pertinent to plugins that if they can prevent certain keypresses from reaching the browser? I know for sure that they can capture the events, as pointed out in FBTestPlugin which illustrates how to capture mouse movements. The question is, can their propagation be stopped?
Reproducing this on SO.