[jawsscripts] Re: Simulating numpad keystrokes when numlock is on.

  • From: "David Pinto" <davepinto@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 12 Sep 2012 10:32:53 -0700

Thanks David for the suggestion, but I'm not certain what you mean. Perhaps 
I'm missing some of your logic.

As stated previously, in the JAWS keyPressedEvent, regardless of whether 
numLock is On or Off, if you press Numpad 6, the strKeyName is "RightArrow".
So, say that when NumLock is Off, and you press numpad 6,  the app executes 
a right arrow. But when NumLock is On, and you press numpad 6, the app says 
a Knock Knock Joke.  Well, the latter is what I want JAWS to trigger. Make 
the App say a Knock Knock Joke. But with NumLock On, I can't simulate a 
numpad 6 keypress. The user has to press it. Basically, when NumLock is on, 
all I can do is respond to a numpad keypress. For instance,

If in the KeyPressed Event you insert the following line: TypeKey 
(strKeyName). Then, with numlock Off, pressing Numpad 6, would result in the 
RightArrow being executed twice. But with Numlock on, then pressing Numpad 6 
would result in the App telling a Knock Knock Joke, and then the right arrow 
would be executed. That shows that with numlock on, JAWS can pass a numpad 
keypress through to the app, but it can't simulate the numpad keypress. If 
it could, one would have heard a Knock Knock joke twice.

I use GetKeyState to determine if numlock is on In the KeyPressedEvent. And 
if it is on, then it triggers a function to process the applications 
response to the numpad keypress. Like this.
GetKeyState ("numlock",0,iNumLockOn)
If iNumLockOn && NumPadKeyPressed (nKey) then
    MonitorApplicationsResponse ()
EndIf

But once again, that's all I can seem to do. Namely, respond to numpad 
keypresses when numLock is On.

Finally, when NumLock is on, and you create a script with the New Script 
dialog, the Assign to key field will not accept a numpad keypress. And 
assigning the keypress in the JKM file won't help either, because back in 
the app, when numlock is on, and you press the assigned numpad key, JAWS 
will not execute the script.

You mentioned PassKeyThrough. But that function bypasses JAWS for the 
subsequent keystroke, not the current keystroke. So, aside from the 
limitations listed above, I'm not sure how PassKeyThrough would help.

If I'm missing some of your logic, could you show me example code?

David




----- Original Message ----- 
From: "David Farough" <David.Farough@xxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Wednesday, September 12, 2012 8:13 AM
Subject: [jawsscripts] Re: Simulating numpad keystrokes when numlock is on.


> Hi David:
> There may be better ways to do this, but how about creating scripts for
> the desired keys, where you use getKeystate to test the state for the
> numlock key.  If the state is on then use the PassKeyThrough followed by
> the desired keystroke. for the off condition you would just pass the
> keystroke normally.
> I hope this works.
>
> David Farough
> Application Accessibility Coordinator/coordonateur de l'accessibilité
> Information Technology Services Directorate /
> Direction des services d'information technologiques
> Public Service Commission / Commission de la fonction publique
> Email / Courriel:  David.Farough@xxxxxxxxxxxxx
> Tel. / Tél:    (613) 992-2779
>
>>
> This e-mail message is intended for the named recipient(s) and may
> contain information that is privileged, confidential and/or exempt from
> disclosure under applicable law. Unauthorized disclosure, copying or
> re-transmission is prohibited. If you are not a named recipient or not
> authorized by the named recipient(s), or if you have received this
> e-mail in error, then please notify the sender immediately and delete
> the message and any copies.
> >
> Ce courriel est destiné exclusivement au destinataire mentionné en titre
> et peut contenir de l'information privilégiée, confidentielle ou
> soustraite à la communication aux termes des lois applicables. Toute
> divulgation non autorisée, toute reproduction ou réacheminement est
> interdit. Si vous n'êtes pas le destinataire de ce courriel, ou n'êtes
> pas autorisé par le destinataire visé, ou encore, si vous l'avez reçu
> par erreur, veuillez le mentionner immédiatement à l'expéditeur et
> supprimer le courriel et les copies.
>
> __________�
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> 


__________�

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

Other related posts: