Skip to content

Commit 8746d81

Browse files
committed
Fix waitForKeypress() event consuming and add visual indicator (#4866)
1 parent 083a848 commit 8746d81

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

guide/ch_scripting.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,17 @@ \subsection{Pause/Resume}
154154
\label{sec:scripting:differences:pause}
155155

156156
The Qt6-based builds (version 1.0 and later) do not offer a way to pause and resume a script as was available in the Qt5-based builds (0.10 to 0.22).
157+
However, \texttt{core.waitForKeypress()} can be used to pause a script until a key is pressed,
158+
which is particularly useful for planetarium presentations with a Bluetooth or wireless remote clicker.
159+
A visual indicator \emph{``Press any key to continue...''} will be displayed on screen while the script is paused.
160+
161+
Example usage:
162+
\begin{script}
163+
core.goToObject("Orion");
164+
core.waitForKeypress();
165+
core.goToObject("Sirius");
166+
core.waitForKeypress();
167+
\end{script}
157168

158169
\subsection{The Vec3f problem}
159170
\label{sec:scripting:differences:Vec3f}

0 commit comments

Comments
 (0)