Skip to content

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 the user.pages action class, translating standard navigation commands into Okular-specific keypresses.
  • okular.talon: Activates when Okular is the focused application. It enables the user.pages tag, 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 l and h respectively.
  • Jump to Page: Presses ctrl-g, waits for the navigation dialog, inputs the target page number, and presses enter.
  • Get Current Page: Presses ctrl-g to focus the page input field, reads the selected text to determine the current page number, and then dismisses the dialog with escape.
  • Go to Final Page: Triggers ctrl-end to jump directly to the end of the document.