I have noticed that when I run my experiment from Safari, each time the experiment waits for a key response to progress, there is an annoying beep when a correct response has been made.
This is not the case on local runs, nor when running in Chrome.
Any ideas what might cause this and how to turn it off?
Any update on this issue?
My experiment, when piloted, (https://pavlovia.org/naomilee/num-abb) does the same exact thing on Safari only! Any key press with a correct response is rewarded with the Mac error noise (funk.caf)
Same here. It doesnāt happen on other Javascript-based experimental platforms, so it should be fixable. Maybe not high priority, since many people have Chrome installed on their notebooks anyhow?
Put something like this at the beginning of the experiment.
I actually wanted to prevent browsers from reacting to default keyboard shortcuts, because Firefox would use ābackspaceā to go back one site, and found the solution on this page (āsee 2.3 Suppressing Default Event Handlingā).
Hopefully, this will help some of you as well
Hey @Marc_Buehner, @jlc, @naomileenaomi, @DanielKuroschHopfner, many thanks for flagging. As it happens, fullscreen mode Safari does indeed trigger the macOS bell on key press. I have now raised the issue on GitHub and appreciate your understanding while we work towards a permanent fix.
Hi @itreves36, would it be possible to send me a link to your code? I brought a fix in for this recently, which I then had to pull back from, because Safari latest no longer has this problem and as not all studies suffer from it, the workaround is best kept inside the JS boilerplate rathen than the PsychoJS library if that makes any sense, x
Hi, so I figured out that exiting fullscreen and then re-entering can get rid of the error noises. Hereās my code as well (I temporarily set it to public):
Hi @itreves36, I see no TextBox components in your project, I believe if you drop the following in a JS-only Before Experiment tab in e.g. the beginCode routine, that should work,
window.addEventListener("keydown", onkeydown);
function onkeydown(keydownEvent) {
keydownEvent.preventDefault();
}
In that case you could either generate the participant information elsewhere (e.g. through the VESPR Study Portal) or try adding the code in Begin Experiment instead of Before.