Skip to content

Commit

Permalink
adding detail to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Philip committed Jan 1, 2012
1 parent f017ddb commit 33735f7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions readme.md
Expand Up @@ -32,18 +32,16 @@ var keypad = new Backbone.OnTheCouch.KeyEvents();

// listen for any of the commonly used d-pad keys (left, right, up, down, enter, space and escape)
keypad.bind("key:up", function(){//do something on up});

```
If you're using an event aggregator. You can have the events trigger on that instead:
``` javascript
``` javascript
var eventAggregator = _.extend({}, Backbone.Events);
var keypad = new Backbone.OnTheCouch.KeyEvents({eventAggregator: eventAggregator});

// listen for any of the commonly used d-pad keys (left, right, up, down, enter, space and escape)
eventAggregator.bind("key:up", function(){//do something on up});

```
Expand Down

0 comments on commit 33735f7

Please sign in to comment.