Sha256: f64bde9ef74eb81140bf81b308fd2c017fddcce30116e88b11b19252308861df

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

//
// Register all the keyboard inputs for Parade presentation events.
//

$(document).ready(function() {

  $.subscribe("console:show",function() {
    KeyboardJS.disable();
  });

  $.subscribe("console:hidden",function() {
    KeyboardJS.enable();
  });

  KeyboardJS.on('space, right, pagedown, down', function(){
    $.publish("presentation:slide:next");
  });

  KeyboardJS.on('shift + space, left, pageup, up', function(){
    $.publish("presentation:slide:previous");
  });

  KeyboardJS.on('h, ?', function(){
    $.publish("help:toggle");
  });

  KeyboardJS.on('b, f', function(){
    $.publish("presentation:footer:toggle");
  });

  KeyboardJS.on('d', function(){
    $.publish("debug:toggle");
  });

  KeyboardJS.on('n', function(){
    $.publish("presentation:speaker:notes:toggle");
  });

  KeyboardJS.on('shift + p', function(){
    $.publish("presentation:pause:toggle");
  });

  KeyboardJS.on('p', function(){
    $.publish("presentation:preshow:toggle");
  });

  KeyboardJS.on('enter', function(){
    $.publish("code:execute:visible")
  });

  KeyboardJS.on('escape', function(){
    $.publish("code:execution:clear");
  });
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
parade-0.8.0 lib/public/js/parade-keyboard-input.js