Skip to content

Commit

Permalink
Merge remote branch 'nelstrom/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
schacon committed May 5, 2010
2 parents 38ebade + da8616f commit 2a68fa4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
10 changes: 9 additions & 1 deletion README.txt
Expand Up @@ -162,7 +162,7 @@ custom effects.
You can manage the presentation with the following keys:

* space, cursor right: next slide
* cursor left: previous slide
* shift+space, cursor left: previous slide
* d: debug mode
* c: table of contents (vi)
* f: toggle footer
Expand All @@ -188,6 +188,10 @@ So far, ShowOff has been used in the following presentations:
* PyCon 2010 - Hg and Git; Can't we all just get along? - Scott Chacon
http://github.com/schacon/pycon-hg-git

* ScotRUG lightning talks, February 2010 - Bankjob & Associates - Drew Neil
http://github.com/nelstrom/bankjob_and_associates
http://bankjob-and-associates.heroku.com/

* PdxJs Tech Talk - Asynchronous Coding For My Tiny Ruby Brain - Rick Olson
http://github.com/technoweenie/pdxjs-twitter-node

Expand All @@ -197,6 +201,10 @@ So far, ShowOff has been used in the following presentations:
* PDXRB Tech Talk - Here's Sinatra - Jesse Cooke
http://github.com/jc00ke/pdxrb_sinatra

* Edinburgh TechMeetup, April 2010 - HTML5 Video - Drew Neil
http://github.com/nelstrom/html5_video_presentation
http://html5-video-slides.heroku.com/

If you use it for something, please let me know so I can add it.

Future Plans
Expand Down
21 changes: 19 additions & 2 deletions public/js/showoff.js
Expand Up @@ -15,6 +15,7 @@ var incrCurr = 0
var incrCode = false
var debugMode = false
var gotoSlidenum = 0
var shiftKeyActive = false


function setupPreso(load_slides, prefix) {
Expand All @@ -32,6 +33,7 @@ function setupPreso(load_slides, prefix) {

// bind event handlers
document.onkeydown = keyDown
document.onkeyup = keyUp
/* window.onresize = resized; */
/* window.onscroll = scrolled; */
/* window.onunload = unloaded; */
Expand Down Expand Up @@ -250,7 +252,7 @@ function keyDown(event)
if (event.ctrlKey || event.altKey || event.metaKey)
return true;

debug('key: ' + key)
debug('keyDown: ' + key)

if (key >= 48 && key <= 57) // 0 - 9
{
Expand All @@ -265,9 +267,14 @@ function keyDown(event)
}
gotoSlidenum = 0;

if (key == 16) // shift key
{
shiftKeyActive = true;
}
if (key == 32) // space bar
{
nextStep()
if (shiftKeyActive) { prevStep() }
else { nextStep() }
}
else if (key == 68) // 'd' for debug
{
Expand Down Expand Up @@ -308,6 +315,16 @@ function keyDown(event)
return true
}

function keyUp(event) {
var key = event.keyCode;
debug('keyUp: ' + key);
if (key == 16) // shift key
{
shiftKeyActive = false;
}
}


function swipeLeft() {
prevStep()
}
Expand Down

0 comments on commit 2a68fa4

Please sign in to comment.