Re: scripting question - how to perform key presses


Igor Kaplan
 

Joseph,

 

  So wonderful! Thanks a lot for those source code links. Will start investigating.

 

From: nvda@nvda.groups.io [mailto:nvda@nvda.groups.io] On Behalf Of Joseph Lee
Sent: Thursday, July 07, 2016 8:19 PM
To: nvda@nvda.groups.io
Subject: Re: [nvda] scripting question - how to perform key presses

 

Hi Igor,

Ah, add-on source code: they are located in various places. For now, source code for add-ons hosted at addons.nvda-project.org are located at:

http://bitbucket.org/nvdaaddonteam

For some of my own add-ons, the source code can be found at:

http://github.com/josephsl

The complete list of URL’s for source code is:

·         Joslee’s NVDA lab: http://github.com/josephsl/nvda (a fork of NVDA screen reader source code with certain branches/labs under development; one of them, if it gets integrated into NVDA, will let you turn off add-ons without having to restart NVDA with all add-ons disabled).

·         StationPlaylist Studio: http://github.com/josephsl/stationplaylist (the add-on for SPL Studio, a radio broadcasting automation software).

·         Windows 10 App Essentials: http://github.com/josephsl/wintenapps (a collection of app modules and a global plugin routine to enhance support for Windows 10, including workarounds for issues encountered in Insider Preview builds).

·         GoldWave: http://github.com/josephsl/goldwave (a popular audio editing tool).

·         Enhanced Touch Gestures: http://github.com/josephsl/enhancedtouchgestures (additional touchscreen commands that should have been part of NVDA to begin with).

·         Easy Table Navigator: http://bitbucket.org/nvdaaddonteam/easyTableNavigator (adds table layer commands; will be moving to GitHub in August).

·         Resource Monitor: http://bitbucket.org/nvdaaddonteam/resourceMonitor (adds resource usage commands such as disk space; originally developed by Alex Hall).

·         Control Usage Assistant: http://bitbucket.org/nvdaaddonteam/controlUsageAssistant (adds context-sensitive help for certain controls; my very first add-on; current maintainer is Derek Riemer, the developer responsible for letting you hear line indentation via tones in latest NVDA alpha snapshots).

 

Apart from Joslee’s NVDA Lab, others are add-ons I personally wrote or helped maintain. I’m also serving as one of the reviewers for community add-ons and am the original author of NVDA add-on development guide (not the NV Access version) and am currently leading a course on writing app modules (in fact, the most recent session talked about commands and gestures, and the next few sessions will dive into objects and events (sessions that people writing app modules should attend, as you’ll need info in there to be successful in writing app modules).

About Foobar2000: there is an app module for it as part of NVDA. It might be best to investigate that first (yes, at one point or another, you need to take a look at NVDA screen reader source code).

As for touchscreens: I’m keeping an eye on it, as it opens up a lot of potential.

Cheers,

Joseph

 

From: nvda@nvda.groups.io [mailto:nvda@nvda.groups.io] On Behalf Of Igor Kaplan
Sent: Thursday, July 7, 2016 4:58 PM
To: nvda@nvda.groups.io
Subject: Re: [nvda] scripting question - how to perform key presses

 

Hi Joseph,

 

  Thanks a lot for your reply.

  For now I am not doing anything complex. I have the surface pro device and I would like to create several simple addons. For example I would like to create the addon for foobar 2000, which will play and stop (pressing the f5 key) when 2 fingers are doubletapped. So wen I doubletap with 2 fingers, NVDA will press the f6 key.

  I am a long time python programmer, however still have not done much with NVDA scripting. Lately I am more and more appreciate the power of NVDA, there are more and more applications with which NVDA works better then any other screen readers, so I would like to start scripting it a little bit, to add even more power! J

  Joseph, you mentioned, that the keyboardHandler is used in SPL Studio addons, where I can find those addons. I have checked the NVDA addons page and did not find anything.

  May be someone could please point me to those addon.

 

  Many thanks and all the best!

 

   -Igor.

From: nvda@nvda.groups.io [mailto:nvda@nvda.groups.io] On Behalf Of Joseph Lee
Sent: Thursday, July 07, 2016 2:08 PM
To: nvda@nvda.groups.io
Subject: Re: [nvda] scripting question - how to perform key presses

 

Hi,

I’ll address both questions here:

In short, you need help from keyboard handler to do this. The big picture is:

1.       Create a script.

2.       Within this script, call keyboardHandler and tell it to create a gesture from name (SPL Studio add-on uses this in encoder support routines).

3.       Pass it on.

 

For Igor: which add-on are you developing? Let us know if you need further assistance.

Cheers,

Joseph

 

From: nvda@nvda.groups.io [mailto:nvda@nvda.groups.io] On Behalf Of Richard Kuzma via Groups.io
Sent: Thursday, July 7, 2016 11:02 AM
To: nvda@nvda.groups.io
Subject: [nvda] scripting question - how to perform key presses

 

Hi everyone.

I would like to know how to perform a keypress in a nvda script also.

Thanks so much

Join nvda@nvda.groups.io to automatically receive all group messages.