Permalink
Browse files

adding detail to readme

  • Loading branch information...
1 parent f017ddb commit 33735f7e93194b21431ef02dfba11910c0b11bcd @tommysqueak committed Jan 1, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 readme.md
View
4 readme.md
@@ -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});
-
```

0 comments on commit 33735f7

Please sign in to comment.