How can I detect a keypress in Impress using LibreOffice?

I’m working on a presentation that will require someone to press a key (specifically the numbers 1-9) for user interaction. The goal is that this presentation on Impress will be open in presentation mode so that someone could press 1 to go to the next slide or press 2 to go back to the beginning and the program can detect those numbers and do exactly that. I haven’t been able to find anything, so if anyone would have any idea, I would love to know! Thank you!

Edit: It has also come to my attention that I will need to install a “listener” so that the program will detect when the key is actually pressed too, and attach these to a macro. Any advice on how to do this would also help!

The tags aren’t made to create a kind of index.
Simply retagging your question to impress would clear the case. You may add shortcuts
Actions of the kind you want to achieve should be possible by assigning shortcut keys to little routines for the actions. However, keyboard settings can’t be sabed to the document, but need to be defined for the local installation.

I’ve fixed the tags, thanks!

Since I next to never used impress, I surely can’t help much, but I think the QriginalQuestion should get added information about the usage of the Presenter Console. Can it be used? If not, for what reasons? If yes, what’s actually missing in the list of keys defined for it?


If you are new to macros then this likely not something you will easily comprehend.

Work very little with Impress but did something similar to what you ask for. There is a sample in this post → Fatal Error in KeyHandler_keyPressed, an uninitialised event object?

It is important you comprehend the text in the answer.

This won’t help much but here is the link to the LO documentation → Documentation/Publications

There is macro information (limited) in various sections including the Getting Started section.