<div>Paul,</div>
<div>&nbsp;</div>
<div>Yes, but I would like not to have to code the same response to two different responses (like pressing Yes or the Y-key).</div>
<div>I guess&nbsp;I have to find a way to fire an event from both, that goes to a third repsonse for both, or find a pressKey function, so I can emulate a keypress (like pressKey(&#39;n&#39;) when button No is clicked) and get both responses in one.</div>

<div>&nbsp;</div>
<div>Julian,</div>
<div>&nbsp;</div>
<div>That would be very nice! If I could set the focus I could control where you go to when the spacebar is pressed, so you will not end up repeatedly going back to the menu before you figure out what is causing that. In our modules we use the spacebar to go to the next piece of text (when texts appear not at once but paragraph by paragraph).</div>

<div>&nbsp;</div>
<div>Thanks.</div>
<div>&nbsp;</div>
<div>Elly</div>
<div><br><br>&nbsp;</div>
<div class="gmail_quote">On Fri, Oct 24, 2008 at 6:07 PM, Paul Swanson <span dir="ltr">&lt;<a href="mailto:Paul.Swanson@harlandfs.com">Paul.Swanson@harlandfs.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div dir="ltr" align="left"><span><font face="Verdana" color="#0000ff" size="2">You can set up a key press interaction by adding an event response to the interaction icon that contains your button. The eventName property&nbsp;is onKeyDown and set the icon property to rootIcon. Then add a script icon with something like the following:</font></span></div>

<div dir="ltr" align="left"><span><font face="Verdana" color="#0000ff" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="Verdana" color="#0000ff" size="2">keyPressed = Key.getCode();</font></span></div>
<div>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="Verdana" color="#0000ff" size="2">if ((keyPressed == 13) || (keyPressed == 9)) { // Enter or Tab pressed</font></span></div>
<div dir="ltr" align="left"><span><font face="Verdana" color="#0000ff" size="2"><br>&nbsp; // do whatever</font></span></div>
<div dir="ltr" align="left"><span><font face="Verdana" color="#0000ff" size="2"></font></span><span><font face="Verdana" color="#0000ff" size="2"><br>}</font></span></div>
<div dir="ltr" align="left"><span><font face="Verdana" color="#0000ff" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="Verdana" color="#0000ff" size="2">The key numbers correlate to the ASCII chart of characters. A-Z is 65-90, a-z is 97-122, so for a lower-case y you would want to look for 121, capital Y should be 89. Lower-case n should be 110, and capital N should be 78 (if I counted correctly).</font></span></div>
<br>
<blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2">
<div class="Ih2E3d"><b>From:</b> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Elly Langewis<br>
</div><b>Sent:</b> Friday, October 24, 2008 8:48 AM<br><b>To:</b> Xerte discussion list<br><b>Subject:</b> Re: [Xerte] default button<br></font><br></div>
<div>
<div></div>
<div class="Wj3C7c">
<div></div>
<div>Thanks Julian, that explains. </div>
<div>Is it possible to set the focus to a certain button? And is it possible to make a button react to a certain key pressed, like when I have two buttons, yes and no, and want the user to be able to press Y&nbsp;or N (besides making a third response to catch that)?</div>

<div>&nbsp;</div>
<div>Elly<br><br></div>
<div class="gmail_quote">On Fri, Oct 24, 2008 at 5:03 PM, Julian Tenney <span dir="ltr">&lt;<a href="mailto:Julian.Tenney@nottingham.ac.uk" target="_blank">Julian.Tenney@nottingham.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-GB" vlink="purple" link="blue">
<div>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">It&#39;s built in accessibility. It will only respond to keys whilst it has the focus. When you click elsewhere, the focus moves away from the button and it doesn&#39;t respond to keypresses. All the interaction responses can be controlled with the keyboard.</span></p>

<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d"></span>&nbsp;</p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p style="MARGIN-LEFT: 36pt"><b><span lang="EN-US" style="FONT-SIZE: 10pt">From:</span></b><span lang="EN-US" style="FONT-SIZE: 10pt"> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Elly Langewis<br>
<b>Sent:</b> Friday, October 24, 2008 3:41 PM<br><b>To:</b> Xerte discussion list<br><b>Subject:</b> [Xerte] default button</span></p></div>
<div>
<div></div>
<div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p>
<div>
<p style="MARGIN-LEFT: 36pt">Hi,</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">I&#39;ve got a perpetual button (&#39;Menu&#39;) in my Entry Frame. For some reason, when I have used the button (just once), this button will also get pressed when I hit the space bar. As I have not found yet how to let a button react to key responses I was quite surprised...</p>
</div>
<div>
<p style="MARGIN-LEFT: 36pt">Does anyone know what caused this behaviour? It disappeats after using a text entry response, but after hitting the button again it reacts to the space bar again.</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">TIA</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">Elly</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p></div></div></div></div></div><br>_______________________________________________<br>Xerte mailing list<br><a href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Elly Langewis<br>courseware developer<br>
Department of Biology<br>Utrecht University<br></div></div></blockquote></div><br>_______________________________________________<br>Xerte mailing list<br><a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Elly Langewis<br>courseware developer<br>
Department of Biology<br>Utrecht University<br>