okular
This directory contains the integration files required to enable hands-free document navigation within Okular, a universal document viewer developed by KDE, using the Talon voice recognition system.
The integration supports both Windows and Linux environments, mapping standardized page navigation commands to Okular's specific keyboard shortcuts.
Component Files
okular.py: Defines the application identifier for both Windows (okular.exe) and Linux (okular). It also implements theuser.pagesaction class, translating standard navigation commands into Okular-specific keypresses.okular.talon: Activates when Okular is the focused application. It enables theuser.pagestag, making global page navigation voice commands available.
How It Works
When Okular is the active window, the application matcher defined in okular.py matches the current application context. This triggers the activation of okular.talon, which applies the user.pages tag.
Once the user.pages tag is active, Talon binds standard page navigation commands (defined globally in your Talon configuration) to the Okular-specific actions implemented in the python file:
- Next/Previous Page: Maps to
landhrespectively. - Jump to Page: Presses
ctrl-g, waits for the navigation dialog, inputs the target page number, and pressesenter. - Get Current Page: Presses
ctrl-gto focus the page input field, reads the selected text to determine the current page number, and then dismisses the dialog withescape. - Go to Final Page: Triggers
ctrl-endto jump directly to the end of the document.