We can create new functions and assign custom keys to impress presentations by modifying the existing switch
statement. Earlier, I mentioned the necessity for having an overview step. We'll just add the letter o as the key for the overview step. The implementation for the overview step keys will look as follows:
case 79: var overview_step = document.getElementById("overview"); api.goto(overview_step); break;
First, we have to find the overview of the presentation using its ID. 79
will be the key code for the letter o. We assume that #overview
will be used for the overview step of any presentation. Once we get the element, we can use the goto
function to directly traverse to the overview slide.
Now, let's create two new functions to traverse to the first and last slide of the presentation, using the following code snippet:
case 70: api.goto(0); break; case 76: api.goto(-1); break;