[Xerte] How do I set up a keypress interaction in Xerte?

Paul Swanson Paul.Swanson at harlandfs.com
Tue Jul 22 23:12:56 BST 2008


I'm trying to set up a keypress interaction, so a user can press Enter
or Tab instead of clicking a button.

I have an Interaction icon with a Button response working fine, and to
that same interaction I added an Event response. For the eventName I
used onKeyDown(), for the icon property I used the id of the Interaction
icon. To the Event response icon I added a script icon with the
following:

keyPressed = Key.getCode();

if ((keyPressed == 13) || (keyPressed == 9)) { // Enter or Tab pressed
    rootIcon.nextPage();
}

Of course, nothing happens when I press Enter or Tab. What would be the
correct way to do this?

_____________________________

 Paul Swanson
 Instructional Designer
 Harland Financial Solutions
_____________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20080722/b385f89e/attachment.html


More information about the Xerte mailing list