DMDX Help.

Zillion Enter Key Keyword

<ZillionEnterKey [N]>
<zek [N]>
<ZillionTypedResponses [N]>
<ztr [N]>

    MDSP bit 4000 modifier, the bit that modifies zillion responses to be enter key terminated. Reset if N = 0, otherwise set. All MDSP modifiers are both parameters and switches. If N is missing the bit is set and the mode is active.  As an interesting aside I've since created an AZK version of typed responses that uses macros.  Advantage of that version is that it can be used to present the typed response to the subject.  And since then both have been superseded by the <Prose> keyword.

    Prior to version of DMDX if you are using something other than the standard keyboard you would have had to use the parameter
<ZillionEnterKeyName> to get this to work, however having added support in the <zek> code for the #keyboard device now all keyboards should be OK as long as <id #keyboard> occurs before <zek>.

    This mode has been changed (as of 0.20a) to provide feedback based on the user's input for typed responses (hence the two new typing names) on an
<id keyboard> (or any other device where the DMDX button names follow the form "+a" [the DirectX button name that TimeDX displays would be just "a"] where a is a single alphanumeric character, all others are rejected). It used to set <TooLongFeedback ""> so the Dmastr feedback code that sees no response cleared the subjects input, now there are other mechanisms in place (due to <FBOnlyClearBehind>). The <NoFeedback> keyword can be used to restore old non-echoing behavior.  As of version the numeric keypad names can also be used, they will have to be validated specifically however with <vzk "+numpad 0"> <vzk "+numpad 1"> <vzk "+numpad 2"> <vzk "+numpad 3"> <vzk "+numpad 4"> <vzk "+numpad 5"> <vzk "+numpad 6"> <vzk "+numpad 7"> <vzk "+numpad 8"> <vzk "+numpad 9"> or if you're using version or later and your numpad keys are no longer +numpad but are instead +num then you'll have to validate  <vzk "+num 0"> <vzk "+num 1"> <vzk "+num 2"> <vzk "+num 3"> <vzk "+num 4"> <vzk "+num 5"> <vzk "+num 6"> <vzk "+num 7"> <vzk "+num 8"> <vzk "+num 9">  instead.  And of course if you wanted to use the keypad enter key you'd have to specify it's name with <zekn +numpad enter> (or of course <zekn +num enter> if you have a later system...)

<NoTimeLimit> and <ContinuousRun> are probably good things to use with this mode so DMDX waits for the subject to enter all of their response and then advances to the next item when the subject presses the enter key. If a prompt is to be left on the screen as the user types then the <FBOnlyClearBehind> MDSP should be set.

    NOTE:- <ztr> uses conventional the DMDX feedback mechanisms, if you've turned it off with <nfb> you won't see any typed responses...

<zil> still needs to be specified. As of version 0.28 <ZillionEnterKey> automatically maps +A to +Z, +0 to +9, +Enter and +Space as valid zillion keys, so it's a good idea to have <id keyboard> before the <zek> keyword. The backspacing key mappings were added in 0.28a, +Delete, +Backspace, +Numpad ., and +Right Arrow (which has been changed to +Left Arrow in, damned left/right aphasia...) As of it maps all the relevant +#nnn key names of the #keyboard device if it finds it for international keyboards that have non-standard names.

   Here's an example that's a stressor that asks a subject to subtract seven from a given number and repeat till five minutes elapse:

<ep> <vm desktop> <zil> <zek> <ntl> <cr> <fbocb> <eop>
0 "subtract 7" <randomize> <set c1=777 + random(223)>;
~1 <set c2 = millisectime>;
~100 <bi 999, c1 .lt. 7>;
~1 <bi 999, millisectime .gt. 300000 + c2>;
+101 * "subtract 7 from " <appendcounter 1>;
~1 <set c1 = c1 - 7> <bi 200, c1 .eq. atoizilliontext>;
~102 ;
0 <ln -1> "wrong" , "the correct answer is " <appendcounter 1> <bu 100>;
~200 <bi 999, c1 .lt. 7>;
~1 <bi 999, millisectime .gt. 300000 + c2>;
+201 *;
~1 <set c1 = c1 - 7> <bi 200, c1 .eq. atoizilliontext>;
~1 <bu 102>;
999 "done";

    If you wanted to branch based on an alphabetic response instead of a numeric one you will have to use
<NamingTaskNegation> and then <BranchIfCorrect>.

   Another example that's cropped up recently involves switching modes from typed responses to ratings.  A fair bit of care is involved switching modes on and off and validating keys so only the right ones are available on any given item, here it's worth nothing that when <ztr> gets turned back on it validates all the keys it needs thus saving us from the work.  Also note the use of <Instruction> where it has to be in a different item otherwise it's screws up all the typed feedback:

<id keyboard>
<ZIL> <ZEK> <fbocb> <zol>
<FrameDuration 900>
<t 600000000>
<d 0>
<dfs 20>
<vm 1024,768,768,16,0>
<dbc 000000000>
<dwc 255255255>
<scramble 2> <grouping 2>


01 <Instruction 80,50,900>
"A ", "NAVIGATIONAL ", "INSTRUMENT ", "USED ", "IN ", "MEASURING ", "ANGULAR ", "DISTANCES, ", "ESP. ", "THE ", "ALTITUDE ", "OF ", "THE ", "SUN, ", "MOON ", "AND ", "STARS ", "AT ", "SEA" c;
=01 <zor 0><zek 1> <nfb 0>! <LN -4><X 40> "The word is:"*<Call 400>;

$0 "Thank you"L;

=400 <zek 0> <zor> <nfb> <umb> <izk> <vzk +n> <vzk +y>

*<LN 0><x 100> "DID YOU ENTER A WORD? (Y/N)"<mwb +n, 600 +y, 500>;

=500 <izk> <vzk +1> <vzk +2> <vzk +3> <vzk +4 > <vzk +5>
<ln -3><x 90> "1………..2………..3……….4……….5",
<ln -4><x 90> "LOW…………………………………HIGH" <return>;

=600 <izk> <vzk +1> <vzk +2> <vzk +3> <vzk +4 > <vzk +5>
<ln -2><x 90> "1………..2………..3……….4……….5",
<ln -1><x 90> "LOW…………………………………HIGH" <return>;


DMDX Index.