Quantcast

about winInputHook.keyUpCallback and keyDownCallBack

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

about winInputHook.keyUpCallback and keyDownCallBack

Casalino
Hi,

I am trying to develop the plug-in I was speaking about some weeks ago.

I started from PcKbrBrl as base but I obtaing a discreet risult.

What I do not understand completely is the behaviour of
winInputHook.keyUpCallback and winInputHook.keyDownCallback.

Where can I find usefull documentation about that?

Regards


Gianluca

k


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about winInputHook.keyUpCallback and keyDownCallBack

James Teh
Those hooks are very much internal and should not be messed with. It's true that I did this for pcKbBrl, but that add-on is a fairly special case. The problem with those hooks is that if you break them in any way, you risk trapping *all* keyboard input, which is a major problem for users. For this reason, we don't support their use in add-ons. We can't stop you, of course, but it's not something I'm willing to put time into supporting.

Can you point me at the thread where you discussed the plug-in you're working on? Unless you're handling multiple key presses at a time like pcKbBrl, there should be another, safer way to achieve what you want.

Jamie

On Mon, Jan 30, 2017 at 11:44 PM, Casalino <[hidden email]> wrote:
Hi,

I am trying to develop the plug-in I was speaking about some weeks ago.

I started from PcKbrBrl as base but I obtaing a discreet risult.

What I do not understand completely is the behaviour of
winInputHook.keyUpCallback and winInputHook.keyDownCallback.

Where can I find usefull documentation about that?

Regards


Gianluca

k


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about winInputHook.keyUpCallback and keyDownCallBack

Casalino

I see...

Here what I was asking for:

***

Hi,

One of my friends, a blind old man, has several difficoulties in typing
on a computer keyboard.

He was using so far a particular software designed for blind that allows
typing easily pressing the keys twice to have them confirmed.

In this way He was able to find handy the desired key without risks of
errors in typing.

Now He has asked me to implement a plug-in for nvda to abtain the same
feature.

Could someone of you indicate in wich direction I sould investigate to
achive this kind of result?

Thanks in advance


Il 31/01/2017 00:39, James Teh ha scritto:
Those hooks are very much internal and should not be messed with. It's true that I did this for pcKbBrl, but that add-on is a fairly special case. The problem with those hooks is that if you break them in any way, you risk trapping *all* keyboard input, which is a major problem for users. For this reason, we don't support their use in add-ons. We can't stop you, of course, but it's not something I'm willing to put time into supporting.

Can you point me at the thread where you discussed the plug-in you're working on? Unless you're handling multiple key presses at a time like pcKbBrl, there should be another, safer way to achieve what you want.

Jamie

On Mon, Jan 30, 2017 at 11:44 PM, Casalino <[hidden email]> wrote:
Hi,

I am trying to develop the plug-in I was speaking about some weeks ago.

I started from PcKbrBrl as base but I obtaing a discreet risult.

What I do not understand completely is the behaviour of
winInputHook.keyUpCallback and winInputHook.keyDownCallback.

Where can I find usefull documentation about that?

Regards


Gianluca

k


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about winInputHook.keyUpCallback and keyDownCallBack

Casalino
In reply to this post by James Teh

Hi,

here how I modified pcKbrBrl.

In this way it seems to work, but where are some critical undesired effects that make the plug-in unusable.

In particular way the key function and nvda key too has to be pressed twice and if they are combined with letters or number it becomes unmanageable.

For example to disable the script I have to press twice capslock (my nvda key) and then twice the letter "z".

I should find a way to exclude nvda key shift ctrl but probably not enter.

Thanks


Gianluca

****

    def _keyDown(self, vkCode, scanCode, extended, injected):
#        dot = VKCODES_TO_DOTS.get(vkCode)
#        if dot is None:
        if vkCode in self._trappedKeys:
            self._trappedKeys = set()
            return self._oldKeyDown(vkCode, scanCode, extended, injected)
        self._trappedKeys = set()
        self._trappedKeys.add(vkCode)
#        if not self._gesture:
#            self._gesture = brailleInput.BrailleInputGesture()
#        if dot is " ":
#            self._gesture.space = True
#        else:
#            self._gesture.dots |= dot
        return False

    def _keyUp(self, vkCode, scanCode, extended, injected):
        if vkCode in self._trappedKeys:
            return self._oldKeyUp(vkCode, scanCode, extended, injected)
#        self._trappedKeys.discard(vkCode)
#        if not self._trappedKeys:
#            try:
#                inputCore.manager.executeGesture(self._gesture)
#            except inputCore.NoInputGestureAction:
#                pass
#            self._gesture = None
#        return False



Those hooks are very much internal and should not be messed with. It's true that I did this for pcKbBrl, but that add-on is a fairly special case. The problem with those hooks is that if you break them in any way, you risk trapping *all* keyboard input, which is a major problem for users. For this reason, we don't support their use in add-ons. We can't stop you, of course, but it's not something I'm willing to put time into supporting.

Can you point me at the thread where you discussed the plug-in you're working on? Unless you're handling multiple key presses at a time like pcKbBrl, there should be another, safer way to achieve what you want.

Jamie

On Mon, Jan 30, 2017 at 11:44 PM, Casalino <[hidden email]> wrote:
Hi,

I am trying to develop the plug-in I was speaking about some weeks ago.

I started from PcKbrBrl as base but I obtaing a discreet risult.

What I do not understand completely is the behaviour of
winInputHook.keyUpCallback and winInputHook.keyDownCallback.

Where can I find usefull documentation about that?

Regards


Gianluca

k


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about winInputHook.keyUpCallback and keyDownCallBack

Travis Siegel

Why write this as an NVDA plugin.  Just write it as a standard stand-alone program, and have it load when the machine starts.  Then, no matter what program he's in, it will still operate normally for him.  (though it sounds like he already has this capability), what is the purpose of making it an NVDA plugin?


On 1/31/2017 3:26 AM, Casalino wrote:

Hi,

here how I modified pcKbrBrl.

In this way it seems to work, but where are some critical undesired effects that make the plug-in unusable.

In particular way the key function and nvda key too has to be pressed twice and if they are combined with letters or number it becomes unmanageable.

For example to disable the script I have to press twice capslock (my nvda key) and then twice the letter "z".

I should find a way to exclude nvda key shift ctrl but probably not enter.

Thanks


Gianluca

****

    def _keyDown(self, vkCode, scanCode, extended, injected):
#        dot = VKCODES_TO_DOTS.get(vkCode)
#        if dot is None:
        if vkCode in self._trappedKeys:
            self._trappedKeys = set()
            return self._oldKeyDown(vkCode, scanCode, extended, injected)
        self._trappedKeys = set()
        self._trappedKeys.add(vkCode)
#        if not self._gesture:
#            self._gesture = brailleInput.BrailleInputGesture()
#        if dot is " ":
#            self._gesture.space = True
#        else:
#            self._gesture.dots |= dot
        return False

    def _keyUp(self, vkCode, scanCode, extended, injected):
        if vkCode in self._trappedKeys:
            return self._oldKeyUp(vkCode, scanCode, extended, injected)
#        self._trappedKeys.discard(vkCode)
#        if not self._trappedKeys:
#            try:
#                inputCore.manager.executeGesture(self._gesture)
#            except inputCore.NoInputGestureAction:
#                pass
#            self._gesture = None
#        return False



Those hooks are very much internal and should not be messed with. It's true that I did this for pcKbBrl, but that add-on is a fairly special case. The problem with those hooks is that if you break them in any way, you risk trapping *all* keyboard input, which is a major problem for users. For this reason, we don't support their use in add-ons. We can't stop you, of course, but it's not something I'm willing to put time into supporting.

Can you point me at the thread where you discussed the plug-in you're working on? Unless you're handling multiple key presses at a time like pcKbBrl, there should be another, safer way to achieve what you want.

Jamie

On Mon, Jan 30, 2017 at 11:44 PM, Casalino <[hidden email]> wrote:
Hi,

I am trying to develop the plug-in I was speaking about some weeks ago.

I started from PcKbrBrl as base but I obtaing a discreet risult.

What I do not understand completely is the behaviour of
winInputHook.keyUpCallback and winInputHook.keyDownCallback.

Where can I find usefull documentation about that?

Regards


Gianluca

k


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel




Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about winInputHook.keyUpCallback and keyDownCallBack

Casalino

Interesting point of view.

The reason is the same of PcKbrBrl.

It also could be a stand-alone program, but it is a plug-in.


Regards


Gianluca


Il 31/01/2017 18:00, Travis Siegel ha scritto:

Why write this as an NVDA plugin.  Just write it as a standard stand-alone program, and have it load when the machine starts.  Then, no matter what program he's in, it will still operate normally for him.  (though it sounds like he already has this capability), what is the purpose of making it an NVDA plugin?


On 1/31/2017 3:26 AM, Casalino wrote:

Hi,

here how I modified pcKbrBrl.

In this way it seems to work, but where are some critical undesired effects that make the plug-in unusable.

In particular way the key function and nvda key too has to be pressed twice and if they are combined with letters or number it becomes unmanageable.

For example to disable the script I have to press twice capslock (my nvda key) and then twice the letter "z".

I should find a way to exclude nvda key shift ctrl but probably not enter.

Thanks


Gianluca

****

    def _keyDown(self, vkCode, scanCode, extended, injected):
#        dot = VKCODES_TO_DOTS.get(vkCode)
#        if dot is None:
        if vkCode in self._trappedKeys:
            self._trappedKeys = set()
            return self._oldKeyDown(vkCode, scanCode, extended, injected)
        self._trappedKeys = set()
        self._trappedKeys.add(vkCode)
#        if not self._gesture:
#            self._gesture = brailleInput.BrailleInputGesture()
#        if dot is " ":
#            self._gesture.space = True
#        else:
#            self._gesture.dots |= dot
        return False

    def _keyUp(self, vkCode, scanCode, extended, injected):
        if vkCode in self._trappedKeys:
            return self._oldKeyUp(vkCode, scanCode, extended, injected)
#        self._trappedKeys.discard(vkCode)
#        if not self._trappedKeys:
#            try:
#                inputCore.manager.executeGesture(self._gesture)
#            except inputCore.NoInputGestureAction:
#                pass
#            self._gesture = None
#        return False



Those hooks are very much internal and should not be messed with. It's true that I did this for pcKbBrl, but that add-on is a fairly special case. The problem with those hooks is that if you break them in any way, you risk trapping *all* keyboard input, which is a major problem for users. For this reason, we don't support their use in add-ons. We can't stop you, of course, but it's not something I'm willing to put time into supporting.

Can you point me at the thread where you discussed the plug-in you're working on? Unless you're handling multiple key presses at a time like pcKbBrl, there should be another, safer way to achieve what you want.

Jamie

On Mon, Jan 30, 2017 at 11:44 PM, Casalino <[hidden email]> wrote:
Hi,

I am trying to develop the plug-in I was speaking about some weeks ago.

I started from PcKbrBrl as base but I obtaing a discreet risult.

What I do not understand completely is the behaviour of
winInputHook.keyUpCallback and winInputHook.keyDownCallback.

Where can I find usefull documentation about that?

Regards


Gianluca

k


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel




Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about winInputHook.keyUpCallback and keyDownCallBack

James Teh
pcKbBrl is somewhat different in that is inherently tied to screen reader functionality (braille input and output). It also uses NVDA's braille translation code and configuration. In your case, I do wonder whether a separate app is more appropriate, since this doesn't seem to be something specific to a blind user; it might be useful to a sighted user as well.

On Wed, Feb 1, 2017 at 7:01 PM, Casalino <[hidden email]> wrote:

Interesting point of view.

The reason is the same of PcKbrBrl.

It also could be a stand-alone program, but it is a plug-in.


Regards


Gianluca


Il 31/01/2017 18:00, Travis Siegel ha scritto:

Why write this as an NVDA plugin.  Just write it as a standard stand-alone program, and have it load when the machine starts.  Then, no matter what program he's in, it will still operate normally for him.  (though it sounds like he already has this capability), what is the purpose of making it an NVDA plugin?


On 1/31/2017 3:26 AM, Casalino wrote:

Hi,

here how I modified pcKbrBrl.

In this way it seems to work, but where are some critical undesired effects that make the plug-in unusable.

In particular way the key function and nvda key too has to be pressed twice and if they are combined with letters or number it becomes unmanageable.

For example to disable the script I have to press twice capslock (my nvda key) and then twice the letter "z".

I should find a way to exclude nvda key shift ctrl but probably not enter.

Thanks


Gianluca

****

    def _keyDown(self, vkCode, scanCode, extended, injected):
#        dot = VKCODES_TO_DOTS.get(vkCode)
#        if dot is None:
        if vkCode in self._trappedKeys:
            self._trappedKeys = set()
            return self._oldKeyDown(vkCode, scanCode, extended, injected)
        self._trappedKeys = set()
        self._trappedKeys.add(vkCode)
#        if not self._gesture:
#            self._gesture = brailleInput.BrailleInputGesture()
#        if dot is " ":
#            self._gesture.space = True
#        else:
#            self._gesture.dots |= dot
        return False

    def _keyUp(self, vkCode, scanCode, extended, injected):
        if vkCode in self._trappedKeys:
            return self._oldKeyUp(vkCode, scanCode, extended, injected)
#        self._trappedKeys.discard(vkCode)
#        if not self._trappedKeys:
#            try:
#                inputCore.manager.executeGesture(self._gesture)
#            except inputCore.NoInputGestureAction:
#                pass
#            self._gesture = None
#        return False



Those hooks are very much internal and should not be messed with. It's true that I did this for pcKbBrl, but that add-on is a fairly special case. The problem with those hooks is that if you break them in any way, you risk trapping *all* keyboard input, which is a major problem for users. For this reason, we don't support their use in add-ons. We can't stop you, of course, but it's not something I'm willing to put time into supporting.

Can you point me at the thread where you discussed the plug-in you're working on? Unless you're handling multiple key presses at a time like pcKbBrl, there should be another, safer way to achieve what you want.

Jamie

On Mon, Jan 30, 2017 at 11:44 PM, Casalino <[hidden email]> wrote:
Hi,

I am trying to develop the plug-in I was speaking about some weeks ago.

I started from PcKbrBrl as base but I obtaing a discreet risult.

What I do not understand completely is the behaviour of
winInputHook.keyUpCallback and winInputHook.keyDownCallback.

Where can I find usefull documentation about that?

Regards


Gianluca

k


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel




Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Loading...