oTree Forum >

Select radio buttons via keyboard

#1 by Come_yar


I have a form that has two radio buttons from which the subjects must choose and submit. As of now, they can be selected via mouse cursor. I want the subjects to be able to choose from the two options via pressing two specific keys on the keyboard (i.e., right arrow for the right option and left arrow for the left). Once that's made possible, I want to disable the mouse curser so only the keyboard can be used for doing so.

Any help is much appreciated.

#2 by Chris_oTree

In Javascript, make a handler for the key press event.

Write a reply

Set forum username