Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added ? as an alias for toggle help; updated help box to include most…

… key commands
  • Loading branch information...
commit e40b85b1b3fea14dbc38cb5ab934d46f60a9b6d8 1 parent c911693
@alexch authored
Showing with 16 additions and 10 deletions.
  1. +10 −6 public/js/showoff.js
  2. +6 −4 views/index.erb
View
16 public/js/showoff.js
@@ -326,7 +326,7 @@ function keyDown(event)
return true;
}
- if (key == 13){
+ if (key == 13) {
if (gotoSlidenum > 0) {
debug('go to ' + gotoSlidenum);
slidenum = gotoSlidenum - 1;
@@ -351,10 +351,14 @@ function keyDown(event)
{
shiftKeyActive = true;
}
+
if (key == 32) // space bar
{
- if (shiftKeyActive) { prevStep() }
- else { nextStep() }
+ if (shiftKeyActive) {
+ prevStep()
+ } else {
+ nextStep()
+ }
}
else if (key == 68) // 'd' for debug
{
@@ -380,7 +384,7 @@ function keyDown(event)
{
$('#navmenu').toggle().trigger('click')
}
- else if (key == 90) // z for help
+ else if (key == 90 || key == 191) // z or ? for help
{
$('#help').toggle()
}
@@ -515,7 +519,7 @@ var preshow_timerRunning = false;
var preshow_current = 0;
var preshow_images;
var preshow_imagesTotal = 0;
-var preshow_des;
+var preshow_des = null;
function runPreShow() {
if(preshow_running) {
@@ -571,7 +575,7 @@ function startPreShow() {
function addPreShowTips() {
time = secondsToTime(preshow_secondsLeft)
$('#preshow_timer').text(time + ' to go-time')
- var des = preshow_des[tmpImg.attr("ref")]
+ var des = preshow_des && preshow_des[tmpImg.attr("ref")]
if(des) {
$('#tips').show()
$('#tips').text(des)
View
10 views/index.erb
@@ -50,14 +50,16 @@
<div id="help">
<table>
+ <tr><td class="key">z, ?</td><td>toggle help (this)</td></tr>
<tr><td class="key">space, &rarr;</td><td>next slide</td></tr>
- <tr><td class="key">&larr;</td><td>previous slide</td></tr>
- <tr><td class="key">d</td><td>debug mode</td></tr>
+ <tr><td class="key">shift-space, &larr;</td><td>previous slide</td></tr>
+ <tr><td class="key">d</td><td>toggle debug mode</td></tr>
<tr><td class="key">## &lt;ret&gt;</td><td>go to slide #</td></tr>
- <tr><td class="key">c</td><td>table of contents (vi)</td></tr>
+ <tr><td class="key">c, t</td><td>table of contents (vi)</td></tr>
<tr><td class="key">f</td><td>toggle footer</td></tr>
<tr><td class="key">r</td><td>reload slides</td></tr>
- <tr><td class="key">z</td><td>toggle help (this)</td></tr>
+ <tr><td class="key">n</td><td>toggle notes</td></tr>
+ <tr><td class="key">p</td><td>run preshow</td></tr>
</table>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.