getScale(id).settings.keys( "key1", "key2", ... )
or getScale(id).settings.keys()
Respectively associates the scale’s options with the specified keys for selection.
If you pass no argument, will check whether your scale’s options are all single characters and, if so, will use them as keys. If not, will respectively associate the scale’s options with the numeric keys.
Example:
[js highlight=”3,8,13″ try=”true”]newScale(“grade”, “A”, “B”, “C”, “D”, “E”, “F”)
.settings.labelsPosition(“top”)
.settings.keys()
.print()
,
newScale(9)
.settings.before( newText(“Confidence:”) )
.settings.keys()
.print()
,
newScale(“role”, “TA”, “Professor”)
.settings.labelsPosition(“right”)
.settings.keys(“T”, “P”)
.print()
[/js]
Will add three scales onto the screen. Pressing A, B, C, D, E or F will select an option on the first scale, pressing a numeric key from 1 to 9 will select an option on the second scale, and pressing T or P will select an option on the third scale.