# Key Events with MochiKit

This is an example of one might implement a key listener with MochiKit’s Signal.

For a detailed description of what happens under the hood, check out key_events.js.

View Source: [ index.html | key_events.js | key_events.css ]

This text is replaced with a message when you press Escape or F1.

Event | Key Code | Key String
--- | --- | ---
onkeydown | - | -
onkeyup | - | -
onkeypress | - | -

### Modifiers

Shift | Ctrl | Alt (Option) | Meta (Command)
--- | --- | --- | ---
- | - | - | -