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.