Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make Reveal.js work with a presenter remote?

Tags:

reveal.js

I'm loving Reveal.js so far. One issue I have, though, is that my wireless presentation remote is, as is typical, only capable of generating left/right arrow keystrokes. My Reveal.js slide decks make heavy use of its 2-dimensional capabilities, as well as fragments. That means my remote only goes to the right, not down.

The Reveal.js API looks like it should be strong enough to wire something in so that "right arrow" will first advance down if possible, then right, taking fragments into account. Unfortunately my JS-fu is not that strong, so I figured I'd ask if someone else had done something like this before and had some pointers. If there's some other approach that would work better, I'm open to that, too. I just don't want to be physically bound to my keyboard.

like image 457
Crell Avatar asked Oct 28 '13 03:10

Crell


People also ask

How does a wireless presenter work?

How Does a Presentation Clicker Work? A presentation clicker works by connecting to a computer wirelessly using a Bluetooth connection (often using a Bluetooth receiver). Once connected, it allows the presenter to move the slides forward or backward in the presentation mode using the buttons present on the clicker.


2 Answers

What you want is that it would navigate to "next" instead of "right", which is the default binding for right arrow key. You can achieve this by overriding the default key bindings. There is some documentation here: https://github.com/hakimel/reveal.js/#keyboard-bindings

In your case you would like the right arrow key (keycode 39) to bind to "next" and probably also override left arrow key (keycode 37) to bind to "prev". Here is the sample code (add this to the Reveal.initialize configuration add the end of the file):

keyboard: {     39: 'next',     37: 'prev' } 
like image 94
Cvuorinen Avatar answered Oct 06 '22 10:10

Cvuorinen


reveal.js has a built in remote! If you take a look at dependencies in the README, the very last item in Reveal.initialize is the option to activate a remote! It'll pop up a QR code that you can scan; the website it takes you to syncs with your presentation (over the internet, not local wifi/bluetooth) and allows you to control your presentation with your touchscreen device. There is even an app (for iOS) streamlined specifically for using the remote, I believe it's called RemotesLite.

When using the remote, a tap is equivalent to your spacebar, swipes left/right/up/down are left/right/up/down, and pinch in/out is overview mode activate/deactivate.

Hope this helps!

UPDATE 4/21/2014

It appears as if the most recent version of Reveal has built-in presenter remote support. Recently gave a presentation with a Targus presentation remote and it worked out of the box!

like image 41
Snugug Avatar answered Oct 06 '22 09:10

Snugug