Press enter or click continue

PennController for IBEX Forums Support Press enter or click continue

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #11047
    jjgreen
    Participant

    Is there a way to allow both an “Enter” key or a button press to move on from a trial? I am using textinput, and it would make sense to allow them to press enter to move on, but I don’t want to lose the ability to press a button instead. My project is here: https://farm.pcibex.net/r/qKqKYg/ (sorry if this has been answered elsewhere; I wasn’t able to find anything on it)

    Here’s my trial template:

    Template(“experiment.csv”, row =>
    newTrial(“experiment”,
    newText(“Sentence”, row.Sentence+”___________________.”)
    .cssContainer({“margin-top”:”2em”,”margin-bottom”:”2em”, “font-weight”: “bold”})
    .center()
    .print()
    ,
    newTextInput(“response”, “”)
    .center()
    .log()
    .print()
    ,
    newKey(“enter_after_response”, “Enter”)
    .wait()
    ,
    newButton(“continue_after_response”, “继续”)
    .cssContainer({“margin-top”:”2em”,”margin-bottom”:”2em”})
    .center()
    .print()
    .wait()
    ).log(“Item”,row.Item)
    .log(“Condition”,row.Condition)
    )

    With this code, I can get it to accept an enter press, but then it also requires the button, which doesn’t show up until after the enter press. I want the button to be visible the whole time, and for the trial to end when either the button is clicked or when they press “Enter”.

    • This topic was modified 3 weeks, 2 days ago by jjgreen. Reason: Adding more info
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.