[jawsscripts] Re: Developer needing with pass thru key

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sat, 13 Feb 2010 18:59:12 -0500

I write the following response mostly directly to the person that
authored the original post:

If you just want to pass the key through without any special JAWS
behavior, TypeCurrentScriptKey() should work.  We often also include
SayCurrentScriptKeyLabel() to make JAWS announce the key if it usually
does.

I have never found it useful to call PassKeyThrough() from a script,
because all that does is make the next key the user types go through,
not the key the user just typed that ran the script.

If TypeCurrentScriptKey() is not working for you, your way of
handling the keyboard may have some unusual requirements.  I actually
suggest making sure your keyboard handling technique works under
Windows 7, as a means of verifying that it's not doing something
that will quit working anyway.

I understand your keyboard handling method allows keys to hit JAWS
first.  This is normal, and in my opinion, a good thing.  JAWS
commands would otherwise either fail or cause unwanted side effects.
In other words, I do not recommend using a solution that defeats JAWS
commands, but rather, I recommend a solution that lets JAWS decide (as
usual) what to send through, and then includes scripts that make the
right decisions if necessary.

Finally though, I must admit I'm confused about the problem in one
sense:  You say Tab and Esc don't go through, but JAWS routinely sends
those through unless a virtual cursor (usually HTML) environment is
active.  If focus is in an HTML, Flash, Java VM, or similar setting,
please let us know, as that would throw quite a different spin on
things.

On Sat, Feb 13, 2010 at 05:21:59PM -0500, Ann M. Medlar wrote:
Hi,
I copied a post I received and hope you might help?
 Hi received this post from a Jaws user:

  anything to answer my problem with searching good old google.
   I'm trying to get keys to pass through so that jaws does not intercept
  them to a game called Entombed being developed by a new game developer
  trying to break into the accessible games market.
   I produce games for the blind myself at blind adrenaline dot com, and
  they are all using the jaws .api with no trouble, the difference is, I am 
not
  using direct input, instead grabbing the keyboard directly, which bypasses
  jaws. The developer of entombed is not going this route, instead using
  input methods of XNA, which pass through jaws first unfortunately, meaning 
the
  escape, tab and arrow keys, which are integral to the game are unuseable.
   I have spent hours testing and researching how to do this. I've got
  scripts that in theory should be passing the keys through, but are not, at
  least not properly.
   For instance, the escape and tab keys are not being picked up by the
  game,
  so one has to press insert 3 then the tab key to tab, ditto for escape,
  which is not a viable solution.
   My script will allow me to toggle to bypass mode, but then I have to hit
  the key I want to send, as if I had done the insert 3 option. What is
  baffling is that I know the script is
  running, but the game doesn't seem to recognize the key.

   Here is one of the scripts, this runs when the up arrow  key is pressed,
  although it could be any key. You will notice some commented lines which
  are
  variations I have tried to get this to work to no avail, also a beep just
  so
  I know the script is running:


  include "hjconst.jsh"

  include "hjglobal.jsh"

  Include "hjhelp.jsh"

  Include "common.jsm"

  script escapePass ()

  beep()

  typeCurrentScriptKey()

  PassKeyThrough()

  TypeKey ("uparrow")

  pause()

  ;TypeKey (tab)

  ; TypeKey (cksTab)

  ; TypeKey (cksUpArrow)

  endscript

   I have also checked the keyboard file to make sure all is well there, and
  the up arrow does trigger the beep, so I know its at least firing off the
  script.
   I am new to jaws scripting, although I have done a lot of vb and c sharp
  codeing, so it is possible I am missing the entire boat here, but I've
  been
  at this for quite a while now and all I've acheved so far is a beep and
  being able to toggle to pass through mode with one key. For example, if
  pass
  through is uncommented here, and I hit up arrow twice, then it works, but
  having to hit each key twice is nuts.
   Surely there is a way to do this.  The game is keyboard driven, and the
  developer has put in alternate keys for the arrows, but his solution is
  clumsy at best.
   If we could just get jaws to send a key directly to the game, we'd be
  cooking.
   Any thoughts sincerely appreciated here, and I'm happy to bribe folks
  with
  free memberships to my online card games if any contributors are
  interested
  in playing cards with us.
   Thanks much,
   Che

----- Original Message ----- 
From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>; <programmingblind@xxxxxxxxxxxxx>
Sent: Saturday, February 13, 2010 1:25 PM
Subject: [jawsscripts] Fwd: [program-l] vs 2010 - call for jaws scripters


> -------- Forwarded Message --------
> Subject: [program-l] vs 2010 - call for jaws scripters
> Date: Tue, 9 Feb 2010 19:51:49 -0500
> From: Justin Daubenmire <justind@xxxxxxxxx>
> Reply-To: program-l@xxxxxxxxxxxxx
> To: <program-l@xxxxxxxxxxxxx>
>
> All,
>
> Please forward this email onto any person who you think may be
> interested in
> volunteering.
>
> If there are any jaws scripters interested in contributing to programming
> jaws 11 to work with visual studio 2010 please send me an email at
> justind@xxxxxxxxx and let me know.
>
> I am just putting my feelers out at this point to see how many scripters
> may
> be interested. If there are enough volunteers with enough scripting
> skill, I
> may consider taking the time to head this project up and also host it on
> google code so we can have a source code history.
>
> /Justin
>
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** program-l-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
> 

__________?
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: