Message Boards Message Boards

6 Replies
12 Total Likes
View groups...
Share this post:

How can I advance Mathematica slides remotely ... ?

In PowerPoint I can advance slides with a USB gizmo that emulates the arrow keys. Is there anything analogous in Mathematica?

So far, only the < and > at the top of the screen seem to do this.

I'm lecturing March 2, 4, and 6. :-)

Thank you, -- Mark

POSTED BY: Mark Tuttle
6 Replies

For some reason, my very old "presenter" gizmo works on the right and left arrows and not the page up and page down arrows. Further, a quick look at some of the presenters on Amazon indicate problems with Macs - my preferred platform. So, I'm tabling this discussion for the moment, and will take it up the next time I'm presenting - maybe late this Spring.

If anyone has a solution to this for Macs please let me know.

Thank you, -- Mark

POSTED BY: Mark Tuttle

Page Up and Page Down are wired up to flip between slides (this is how the majority of presenter devices actually work). It might be easier to work with them instead of having to apply an EventHandler to every slideshow notebook you create. If you are running Windows, you can also use the back and forward buttons on your mouse.

POSTED BY: Ian Hojnicki

Thank you! Your code is very helpful. Now to the questions:

  1. I can't find this documented anywhere. Specifically, the token "ScrollPageNext" does not appear in the "Wolfram Documentation".

  2. If I put in your code, by itself, then, as advertised, the right arrow key advances my slides in a Mathematica slide show, and not just in my notebook. Nice!

  3. To try to get the left arrow key to be associated with backing up one slide I guessed at the second command below. It works great but it disables the right arrow key ... ! :-)

I would love to use these and other features if they are explained anywhere.

Before I bother Support, I thought I'd ask you again.

Thank you!

-- Mark

SetOptions[EvaluationNotebook[], NotebookEventActions -> {"RightArrowKeyDown" :> FrontEndExecute[ FrontEndToken[EvaluationNotebook[], "ScrollPageNext"]]}]

SetOptions[EvaluationNotebook[], NotebookEventActions -> {"LeftArrowKeyDown" :> FrontEndExecute[ FrontEndToken[EvaluationNotebook[], "ScrollPagePrevious"]]}]

POSTED BY: Mark Tuttle

Yes, indeed my answer is breadcrumbs down a winding trail... I only opened the can of worms because you mention needing to connect with an arrow key emulator. I am not sure that your USB gizmo can trigger page up/down commands or if you would rather get a new gizmo that can, but here are my answers if you're interested.

I do not know if the "ScrollPageNext" token is documented anywhere, or if support could/would point you to it, I guess not. I found it inside of the slide show palette by opening the palette from the menu Palettes > Slide Show. Once the palette is open you can find its corresponding notebook object using Notebooks[] and selecting the one with the title "Slide Show". For ease of demonstration, once you open the palette simply evaluate nb = Notebooks["SlideShow"][[1]]. Now, NotebookGet[nb] will return the full notebook expression for the palette and the "ScrollPageNext" token can be mined from the magic buttons in the palette. Although these tokens are publicly discoverable, I suppose their undocumented nature means that they can be changed at any point by the powers that be. I would certainly defer to Ian's guidance about optimally reliable paths forward :)

Good inference work to get the command for progressing slides in reverse order using the left arrow key. SetOptions will overwrite previous options when reevaluated, so you must include both events as in NotebookEventActions -> {event1 :> action1, event2 :> action2}. Sometimes it is better to append options using Options[], but that has been quite cumbersome for me in the past.

Explicitly, to set both event actions evaluate the following:

nb = EvaluationNotebook[]; SetOptions[nb, NotebookEventActions -> { "RightArrowKeyDown" :> FrontEndExecute[FrontEndToken[nb, "ScrollPageNext"]], "LeftArrowKeyDown" :> FrontEndExecute[FrontEndToken[nb, "ScrollPagePrevious"]] }]

There is some other fun interface magic contained in the stylesheet of this tutorial I created to teach kids about programming.

POSTED BY: Kyle Keane

Sorry, I realize this reply is after your lectures are over, but for the future you can program your own notebook that will intercept key presses and convert them into "next slide" commands by evaluating the following (note that this will override the default behavior of pressing the right arrow key in the notebook where it is evaluated):

SetOptions[ EvaluationNotebook[], NotebookEventActions -> { "RightArrowKeyDown" :> FrontEndExecute[ FrontEndToken[EvaluationNotebook[], "ScrollPageNext"] ] } ]

This same thing can allow you to control your notebooks using sensors when connected to keyboard-emulating products such as the verve2 :)

POSTED BY: Kyle Keane

I use an old HP presenter for my talks. I don't have it in front of me, so I don't know what the model number is.

POSTED BY: Ian Hojnicki
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract