This article applies to:
E-Prime 3.0
Detail
This sample illustrates how to control a SlideSlider with the Left and Right Arrow Keys.
Abstract
The Button device accepts input from the mouse by default. This property can be changed to use the keyboard instead by changing the Input Device To Filter property of the Button device from "Mouse" to "Keyboard". However, the specific keyboard keys that manipulate Button, SlideSlider, and SlideChoice objects are not customizable. See the "Input" section of E-STUDIO: Button Device [24411] for a listing of which keys impact which types of buttons. The sample experiment attached to this article illustrates how to move a SlideSlider with keyboard keys other than the pre-defined keys listed in Article 24411.
This sample demonstrates how to move a SlideSlider Indicator based on the left and right arrow keys on the keyboard. The Stimulus object has a Duration of "Infinite" and two InputMasks. The first InputMask is for the Button device and terminates the Stimulus object when the "Next" button is pressed. The second InputMask is defined for the two arrow keys (see INFO: {key} naming scheme [35229]), does not terminate the Stimulus object, and accepts up to 100 keypresses (see "Max Count" after clicking the Advanced button for the keyboard Input Mask). A Script Task Event fires on the Stimulus.Keyboard(1).Press event. The Script Task Event increases the slider value by 1 if the right arrow key is pressed and decreases the slider value by 1 if the left arrow key is pressed.
NOTE: The Mouse can also manipulate the Slider since the Input Device To Filter remains set to the Mouse, which allows the "Next" button to be selected with the Mouse.
See Also:
E-STUDIO: Button Device [24411]
E-STUDIO: Script Task Events [23603]
Comments
0 comments
Please sign in to leave a comment.