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 or more commonly, allows typed responses. 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.  The result of the typing is emitted in the .ZIL output file.  As an interesting aside I've since created an AZK version of typed responses that uses macros.  And since then both have been superseded by the <Prose> keyword but people seem to have trouble getting it to work so <ztr> retains it's appeal especially with the addition of the .zilliontext. macro in version 6.0.2.0. of DMDX.

    Prior to version 3.0.1.0 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 version 0.20a of DMDX) to provide feedback based on the user's input for typed responses (hence the two typing synonims) on an
<id keyboard> or as noted earlier an <id #keyboard> device when using DMDX 3.0.1.0 or later.   Additionally any other device can be used 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 3.1.4.2 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 5.1.3.2 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...).

    As of version 6.0.2.0 of DMDX in addition to the resultant typed text being written to the output file the macro .zilliontext. will now contain that text allowing processing of the text with <ztr>.

    Additionally
<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 DMDX feedback mechanisms, if you've turned it off with <nfb> you won't see any typed responses...

    NOTE:
<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 3.0.1.0, damned left/right aphasia...)  As of 3.0.1.0 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 (see the More Complex Counter section in the Introduction for more details):

<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 <delay 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";

    In the distant past if you wanted to branch based on an alphabetic response instead of a numeric one you would have to use
<NamingTaskNegation> and then <BranchIfCorrect> however as of version 6.0.2.0 of DMDX you can use the .zilliontext. macro with the macro string/stack manipulation push and pop commands to compare any given typed response to preset lists of words or to allow the display of the typed text (see item 500 in the example below).  Prior to 6.0.2.0 you would have to resort to either macro typing or <prose> to do so.

   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:

<ep>
<cr>
<RecordClockOnTime>
<id keyboard>
<ZIL> <ZEK> <fbocb> <zol>
<inst hardmargin>
<FrameDuration 900>
<ntl>
<d 0>
<vm desktop>
<scramble 2> <grouping 2>
</ep>

$0 "INSTRUCTIONS" ;$

01 <Instruction .1, .2, .9>
"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 -1> "The word is:" * <Call 400>;

$0 "Thank you"L;

=400 <zek 0> <zor> <nfb> <umb> <izk> <vzk +n> <vzk +y>
*<LN 0> "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 0> "RATE YOUR CONFIDENCE IN THE WORD YOU ENTERED (~.zilliontext.)",
<ln -3> "1.....2.....3.....4.....5",
<ln -4> "LOW..................HIGH" <return>;

=600 <izk> <vzk +1> <vzk +2> <vzk +3> <vzk +4> <vzk +5>
*<ln 0> "RATE YOUR FEELING OF KNOWING",
<ln -2> "1.....2.....3.....4.....5",
<ln -1> "LOW..................HIGH" <return>;

$



DMDX Index.