Skip to content

Commit

Permalink
jdan#3 limiting key combinations for slide controls
Browse files Browse the repository at this point in the history
  • Loading branch information
jdan committed Oct 9, 2012
1 parent 606639e commit 2e7f33f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ cleaver --file=examples/basic.json --output=render.html --style=styles/dark.css
stylesheet is specified with the `--style` flag, that will be rendered
*after* so you can override the default style. Watch out for specificity.

To navigate the slideshow: H, J, BACK, DOWN, and Backspace all go back a slide, while everything else goes forward.
To navigate the slideshow:

* **reverse**: H, J, LEFT, DOWN, and Backspace
* **forward**: K, L, ENTER, UP, RIGHT, and Space

[MIT Licensed](https://github.com/prezjordan/cleaver/blob/master/LICENSE)
5 changes: 3 additions & 2 deletions templates/layout.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@
$(document).on('keydown', function(e) {
var kc = e.keyCode;
// left, down, H, J, backspace
// left, down, H, J, backspace - BACK
// up, right, K, L, space, enter - FORWARD
if (kc == 37 || kc == 40 || kc == 8 || kc == 72 || kc == 74) {
go_back();
} else {
} else if (kc == 38 || kc == 39 || kc == 13 || kc == 32 || kc == 75 || kc == 76) {
go_forward();
}
Expand Down

0 comments on commit 2e7f33f

Please sign in to comment.