[jawsscripts] Re: Questions regarding keypresses

  • From: Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Tue, 19 Dec 2017 22:24:54 +0100

Hi Steve,

Many thanks.  I was very stupid.  I did know the whole event function 
call stuff of keypressed event, but I did not use it correctly. I was 
putting my code into SpacebarPressed event helper function, and it was 
not working there. But in the main eveent function it works. Don't know 
you, which function is running which are announcing the pressed key name 
if we press any key on the keyboard? It is a keyboard hook function, but 
I could not figure out from default.jss which one could it be. I did 
find the ones running if the keyboard help is switched on, but no one 
for simple key echoing.

Csaba


2017. 12. 19. 16:31 keltezéssel, Steve Spamer írta:

Csaba, this is the KeyPressedEvent.  If you look in HJConst.jsh, under
"KeyCodes", then you will find constants for the keyboard keys.
So, in a KeyPressedevent function, you would put something like:

Void Function KeyPressedEvent (int nKey, string strKeyName, int
nIsBrailleKey, int nIsScriptKey)
If (nKey == Key_escape) Then
     do something
ElIf (nKey == Key_SPACEBAR) Then
         {Enter}
EndFunction

Steve.
-----Original Message-----
From: Csaba Godo
Sent: Tuesday, December 19, 2017 1:33 PM
To: JAWSScripts List
Subject: [jawsscripts] Questions regarding keypresses

Hi guys,

How is it possible to intercept, or block some keys? Or modify the
pressed key? For example: I would like to block in some apps ESC key,
which is closes the app. Or in an other app I would like if spacebar key
would act as the enter key. does.
And an other question: which hook function is running if some key is
pressed on the keyboard? I mean which announces the letter or symbol was
typed by keypress.

Thanks!

Csaba
__________�

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

__________�

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

Other related posts: