Shortcut to pause presentation

Hi,
I would like to pause a presentation using a shortcut like the space bar. I dont want to add another button for the user to click. I found the linked topic which says the “key press” can be used to assign a shortcut. But i am not sure how to do it. Can you please share a small example showing a pause and restart using a keyboard shortcut like the tab bar - when first pressed pauses the presentation and the second time continues to play?
Thanks!

Continuing the discussion from Shortcuts for button and through items:

Hi @ame,

I think they are referring to adding a Key Stroke object from the interactions list.

And then I think you would set the following to make it Play/Pause.

But maybe someone from Atomi can clarify if this is not the proper approach to adding keyboard shortcuts.

Cheers,
Keith

1 Like

Thanks! Let me try it.

Thank @Keith for your suggestion :slight_smile:
But if @ame wants to pause/play the presentation using a keyboard shortcut, let’s add the On Key Press event to the slide.
Then, select the Adjust Variable action > choose apPause for Variable and Toggle for Operator.
Please see the image below for details:

image

Nice day, guys.
Thuy

Thanks Thuy! This seems like a perfect solution and it works to some extent well on a single slide presentation.
I attached the space key to this and used it with apPause/Toggle. But it looks like the space key randomly activates other buttons in the slide. I am able to repeat it on a barebones use case.
It has two slides. Each has button which when clicked will take to the other slide 1-> 2 and 2-> 1. I also set the apPause variable to toggle when the key is Spacebar.
But what happens is that when i press the space bar, it activates the button and i move to the other slide.
Am I missing something? I am attaching the simple test case.
pausetest.approj (252 KB)

Looks like if i change the tab Order to None, everything works fine. Thanks!

Looks like if i change the tab Order to None, everything works fine. Thanks!

Yes, you’re right, Ame :blush:
Glad to know that you’ve resolved the issue yourself.

I would like to add additional information that the Space/Enter shortcut will activate the currently focused button, similar to clicking on the button.
If you remove the button tab order, the button will no longer have automatic focus, so it won’t receive the key.