Mozilla XUL Element and Script Reference

Contents  Quick Reference

Key

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

Attributes:

Attributes inherited from XUL Element

cancel

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

charcode

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

disabled

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.

keycode

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.

modifiers

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