nitro_reader
This directory provides Talon integration for the Windows PDF reader, Nitro Reader 5. It enables voice-controlled navigation of documents and tab management by mapping Talon's unified page and tab control actions to the application's native keyboard shortcuts.
The integration is driven by two key files working in tandem:
- nitro_reader_5.py – Handles application detection and the underlying Python action implementations.
- nitro_reader_5.talon – Activates standard behavioral tags when the application is active.
Application Definition and Action Binding
The nitro_reader_5.py script registers a custom module-level application identifier: nitro_reader_five. It targets Windows operating systems where the executable is named nitropdfreader.exe.
When this context is active, the script overrides standard Talon actions to match the application's hotkeys:
- Tabs: Maps the
app.tab_open()action to send the key combinationctrl-shift-o. - Page Navigation: Implements actions for
user.pagesmanipulation:page_next()maps to therightarrow key.page_previous()maps to theleftarrow key.page_final()maps to theendkey.page_jump(number)automates navigating to a specific page by triggering the Go To dialog (ctrl-g), selecting the text field, typing the desired page number, and pressing enter.
Tag Activation
The nitro_reader_5.talon file matches when the focused window belongs to nitro_reader_five. When active, it enables two standard Talon tags:
user.pagesuser.tabs
By activating these tags, the system maps global voice commands (such as commands for switching tabs or jumping between pages) to the specialized Python actions defined in the helper script. This maintains a uniform voice command vocabulary across different PDF readers and tabbed browsers.