<vm 1024,768,16,60> <2did "magic touch usb" bottom,0,512,1024,768 left,0,0,.5,1 right,.5,0,1,1> <mpr +right> <mnr +left> <mr +bottom>
There is one special device name for 2D input and that is "mouse". This device doesn't connect to any DirectInput device nor does it need calibration in TimeDX (not that you could calibrate the mouse anyway as it has relative axes and the calibration routines only handle devices with absolute axes). Instead it taps into the windows mouse messages, both left and right clicks generate the same button press. Because they are windows messages timing isn't going to be real accurate but as far as I can tell the whole pointing paradigm is alien to RTs in any event. It also turns the cursor on seeing as it's kinda hard to use a mouse to point at things unless there's a cursor... Turning on DMDX's <MinSleep> option to maximize processing of the mouse system messages may increase RT accuracy of this special device.
A recent problem is devices having cute little symbols as part of the name making it very hard to get the name of a device into an item file. To combat this DMDX dumps the names of available input devices into the diagnostics, not only that it also checks a parsed version of the name that has unusual characters removed from it that is also printed in brackets.
Options:
The datalogging option initiates data logging with each clockon and must be followed by two parameters. Firstly the maximum number of data points that could be gathered (not all points may be gathered in a trial, data logging terminates when a response is registered) and secondly the period between each data point gathered in milliseconds. Data logged are the coordinates that device presented at that time and not all devices provide a continuous data stream, a lot of them only report movement information so if the device isn't being moved you won't see any data points. Data is dumped at the end of each item on a single line in the output file in triplets of time,x,y and if you're using the "mouse" input device the times can be little wild as Windows delivers mouse movement information at it's leisure.
The noclick option checks all data points received against the button regions so no clicking of buttons is needed. Not all devices provide a continuous data stream so not all 2D devices can be used with noclick.
The checkoverlapping option forces the routines that check coordinates from some device being within a given button's region to check all regions regardless of whether a match is found or not. Normally DMDX stops once a match is found regardless of whether that region is mapped as a response or not. Turning checkoverlapping on allows you to have multiple overlapping regions and select which one is active with the usual <mpr>, <mnr> etc. keywords instead of having to have lots of non overlapping regions and combining signals out of them (which was a pain, believe me).
The cursoroff and cursoron options override the default windows cursor display state for that device. Eg, if you are using the mouse device you'll need cursoroff if you don't want a cursor and you'll need cursoron for all other devices (to date anyway) if you want to see the cursor. Note options that affect the cursor only work with devices that have drivers that affect the cursor. This means things like touch screens and mice, joysticks won't affect the cursor (see Joysticks below).
The clipcursor option confines the cursor to given region of the screen when using the mouse 2Dinputdevice (read: no joystick support, see Joysticks below). clipcursor must be followed by four coordinates in the same way as a button definition (see above). Aside from uses I haven't thought of this allows continuous ratings to be made of video and logged with the datalogging option when the region provided to clip the cursor to is one pixel high and the width of the screen as the following item file demonstrates:
<ep> <cr> <dfm 0.55>
s3 <vm 800,600,16,60> <nfb> <2did mouse datalogging,50,50 clipcursor,0, 525,
800, 526>
<id keyboard>
<eop>
$ 0 @-3 "The instructions", @-2 "across", @-1 "multiple", "lines" <branch 99>
mB+@14"0 1 2 3 4 5 6 7 8",
@15" not at all/ somewhat/ extremely/",
@16" none some a great deal"+;
~99; $
+100 * <d 300> <t 4000> <dv -1,.1,.75,.75> "happy/429-53_l.mpg" <dv% 0> / ~B;
+101 * <d 300> <t 4000> <dv -1,.1,.75,.75> "neutral/485-31_l.mpg" <dv% 0> / ~B;
+102 * <d 300> <t 4000> <dv -1,.1,.75,.75> "sad/331-79_l.mpg" <dv% 0> / ~B;
$ 0 "Done"; $
A more
complicated use of the
clipcursor
option entails having the subject move the mouse back to the center of the
screen between each rating (utilizing noclick
so just positioning the cursor is enough). Although joysticks can now do
better job of this, see Joysticks below. Note that
<id keyboard>
is no longer used as the request is provided by moving the mouse back to
the center of the screen:
<ep> <cr> <dfm 0.55>
s3 g2 <vm 800,600,16,60> <nfb> <2did mouse datalogging,50,50 noclick
clipcursor,0,525,800,526 center,395,520,405,530> <mr +center>
<eop>
$ 0 @-3 "The instructions", @-2 "this time", @-1 "the cursor", "needs to be
centered" , @16 "Continue" <branch 99>
mB+@14"0 1 2 3 4 5 6 7 8",
@15" not at all/ somewhat/ extremely/",
@16" none some a great deal"+;