[solved] Create a non-interactive form and show it until keypress
Hi. I'm using the text display form for the experiment instructions. However, I don't want to show an OK button. Rather, I'd prefer to move forward by simply press a keyboard key. My problem is that I don't figure out how I can obtain this kind of form. From the documentation, I have tried to use the only_render option but it did not work (the form is not shown). Any help?
Thanks.

Comments
Hi Andrea,
When you use ...
set only_render yes... the form is really only rendered, and does not wait for any user input at all. Like a sketchpad with a 0ms duration, basically. Is your problem solved by inserting a keyboard_response after the form?
If you want to remove the button widget, you can edit the form script and simply remove the line that corresponds to the button. (Normally, without setting
only_rendertoyes, removing the 'next' button is not a good idea!)Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Indeed, the problem is solved by inserting a keyboard_response item.
However, this does not work if I use the Psycho backend. A simple structure like this:
-- Text_display_form [with only_render and no buttons]
-- keyboard_response
-- sketchpad
works in Xpyriment (and of course also in Legacy) but in Psycho OpenSesame remains on the text_display and does not show the sketchpad when the user presses the key.
Forget it, now it works for me also in Psycho. I don't know why it did not work initially, but now it is solved.
As always, thanks for your helps.
Hi! I'm having the same issue where the screen is not shown, but it is not fixed by putting a keyboard response after.
Here is the code for that particular screen:
Import the widgets library
from libopensesame import widgets
Create a form
form = widgets.form(exp, cols=[1,1,1,1,1,1,1,1,1,1], rows=[2,1,3,1],
margins=(50,50,50,50), spacing=10)
TOP Left
diceL1 = widgets.label(form,text='[left1]', center=True)
diceL2 = widgets.label(form,text='[left2]', center=True)
diceL3 = widgets.label(form,text='[left3]', center=True)
diceL4 = widgets.label(form,text='[left4]', center=True)
diceL5 = widgets.label(form,text='[left5]', center=True)
Language Question
question = widgets.label(form,text='¿En qué idioma te gustaría responder?/\n\nIn what language would you like to respond?', center=True)
WAIT FOR PLAY MESSAGE
wait=widgets.label(form,text='Por favor espera a que el otro participante haga su jugada. \nPor favor recuerda no tocar la pantalla. \n\n\nPlease wait for the other participant to make the play.\nPlease remember not to touch the screen.', center=True)
#
TOP LEFT PART
form.set_widget(diceL1, (0,0), colspan=1)
form.set_widget(diceL2, (1,0), colspan=1)
form.set_widget(diceL3, (2,0), colspan=1)
form.set_widget(diceL4, (3,0), colspan=1)
form.set_widget(diceL5, (4,0), colspan=1)
form.set_widget(question, (0,1), colspan=5, rowspan = 2)
form.set_widget(wait, (6,1), colspan=3, rowspan = 2)
var.only_render="yes"
Any ideas??
Thank you!!
Scratch that. I was missing the form._exec() line!