# How to use user defined keys for navigating in Slideshows?

How would I define, say < and >, or the left arrow key and right arrow key as keyboard shortcuts for moving forward and backward in slideshows?

Evaluate one line once inside the notebook (or creating a button) will do:

SetOptions[InputNotebook[],
NotebookEventActions :> {{"KeyDown", ">"} :>
FrontEndTokenExecute["ScrollPageNext"], {"KeyDown", "<"} :>
FrontEndTokenExecute["ScrollPagePrevious"]}]


or, using left and right arrows, but a bit more trickery to preserve normal arrow behaviour in the "Working" environment:

    SetOptions[EvaluationNotebook[],
NotebookEventActions :> {"RightArrowKeyDown" :>
If[CurrentValue[SelectedNotebook[], ScreenStyleEnvironment] =!=
"SlideShow",
SelectionMove[SelectedNotebook[], Next, Character],
FrontEndTokenExecute["ScrollPageNext"]],
"LeftArrowKeyDown" :>
If[CurrentValue[SelectedNotebook[], ScreenStyleEnvironment] =!=
"SlideShow",
SelectionMove[SelectedNotebook[], Previous, Character],
FrontEndTokenExecute["ScrollPagePrevious"]]}];


Interestingly enough the PageUp and PageDown keys always are already defined to navigate forward and backward, but one sometimes wants other keys in order to use a programmable (air)mouse.