Topics

What is the best way to get all gestures used in NVDA?


Oleksandr Gryshchenko
 

Hi colleagues,

I have question for those who well know the structure of NVDA components.
If you could, Please tell me how we can programmatically view all the keyboard commands used in NVDA and all installed add-ons.

All I found was to use the inputCore.manager.getAllGestureMappings() method.
Then recursively view the results of this method.
Bound keyboard commands will be in the "gestures" attribute.

Is this the best way to get all used gestures?
Are there other ways to solve this issue?
How to get keyboard commands that are not displayed in the "Input Gestures" dialog?

Grateful for any tips.
Have a nice week-end!
Oleksandr


Noelia Ruiz
 

Hi, imo, inputCore.manager.getAllGestureMappings would be the best method.
To see gestures ich don't appear in the dialog, I would test to create
references to different objects to be used as the parameter of the
above method.
Nice weekend to you.

Cheers


2020-11-20 23:02 GMT+01:00, Oleksandr Gryshchenko <@grisov>:

Hi colleagues,

I have question for those who well know the structure of NVDA components.
If you could, Please tell me how we can programmatically view all the
keyboard commands used in NVDA and all installed add-ons.

All I found was to use the inputCore.manager.getAllGestureMappings()
method.
Then recursively view the results of this method.
Bound keyboard commands will be in the "gestures" attribute.

Is this the best way to get all used gestures?
Are there other ways to solve this issue?
How to get keyboard commands that are not displayed in the "Input Gestures"
dialog?

Grateful for any tips.
Have a nice week-end!
Oleksandr






Oleksandr Gryshchenko
 

Hi Noelia,
I'm very grateful to you for the answer!

It really works, but I couldn't get unsigned add-ons gestures that way.
When I pass a GlobalPlugin instance to this method:

from globalPlugins import someAddon
inputCore.manager.getAllGestureMappings(someAddon)

I get the following error:
AttributeError: 'GlobalPlugin' object has no attribute 'appModule'

But I managed to find a solution as follows:

for plugin in globalPluginHandler.runningPlugins:
    plugin._gestureMap

In this way I can get absolutely all the gestures - both those that have a description (__doc__ attribute) and those that haven't.

Cheers


Noelia Ruiz
 

I am happy for this.
Cheers

Enviado desde mi iPhone

El 22 nov 2020, a las 17:13, Oleksandr Gryshchenko <kita.zup+groups@...> escribió:

Hi Noelia,
I'm very grateful to you for the answer!

It really works, but I couldn't get unsigned add-ons gestures that way.
When I pass a GlobalPlugin instance to this method:

from globalPlugins import someAddon
inputCore.manager.getAllGestureMappings(someAddon)

I get the following error:
AttributeError: 'GlobalPlugin' object has no attribute 'appModule'

But I managed to find a solution as follows:

for plugin in globalPluginHandler.runningPlugins:
    plugin._gestureMap

In this way I can get absolutely all the gestures - both those that have a description (__doc__ attribute) and those that haven't.

Cheers