This example will display an alert only if the key that is pressed should not be allowed in the textbox. Ctrl + C, Ctrl + X, Ctrl + V, and Ctrl + Z should not fire as invalid characters in Mozilla.