Keyboard or MouseClick event in SlideShow Mode




can someone please help me with the following?

How can I make PowerPoint in SlideShow mode react to a keyboard or
mouse-click event? KeyUp/Down/Pressed are for forms only. And there seems to
be no equivalent to the OnKey method that is available in Excel VBA.

The scenario is the following: Each slide in the slide show shows two
pictures for the user to choose. Each slide is therefore timed for about 60
seconds during which the user should make his choices. There are no buttons
or anything else on a slide. The Macro should recognize which key or mouse
button the user has pressed, e.g.key "A" or left mouse button for the left
picture, and key "B" or right mouse button for the right picture. These are
saved in a variable and then shown to the user on the last slide.

Is there anything in VBA for PowerPoint to recognize which button was

Thanks very much,



One of the ways to know which key was pressed is to subclass the slide show
window. You need to know the concepts behind Window and message handling and
Windows APIs.

Another way is to create keyboard shortcuts for the duration of your slide
show or those slides. Much of the ground-work is already done for you in
Shortcut Manager for PowerPoint add-in at You need to use Shortcut
Manager SDK to enable you to handle keyboard shortcuts.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question