Mozilla XUL Element and Script Reference

Contents  Quick Reference


The key element defines a keyboard shortcut. Event handlers can be used to respond when the appropriate keys are pressed.


Attributes inherited from XUL Element


Set to true if the key, if fired should cancel the event chain.


The character that is must be pressed. This should be set to a displayable character.


Set to true to disable the key. This is often used with a broadcaster to disable a menu command and key at the same time.


For keys that do not have displayable characters, such as the enter key or function keys, use this attribute, instead of charcode. Valid keys are listed here.


A list of modifier keys that should be pressed to invoke the keyboard shortcut. Multiple keys may be separated by spaces or commas. Keys will map to other keys on platforms that do not have them.

Properties and Methods:

Properties and Methods inherited from XUL Element