Skip to content

foxit_reader

The community/apps/foxit_reader directory contains files to enable Talon control of the Foxit Reader application.

The core logic is within foxit_reader.py. This file defines the application context for Foxit Reader, using its window title and executable name. It then defines custom actions for the app and user action classes that provide the following functionality:

  • app.tab_open(): Opens a new tab using ctrl-o.
  • app.tab_reopen(): Notifies the user that Foxit doesn't support this action.
  • user.tab_jump(number): Notifies the user that Foxit doesn't support this action.
  • user.tab_final(): Notifies the user that Foxit doesn't support this action.
  • user.tab_duplicate(): Notifies the user that Foxit doesn't support this action.
  • user.page_current() -> int: Returns the current page number by using ctrl-g, getting selected text, and converting to an int.
  • user.page_next(): Navigates to the next page using the right arrow key.
  • user.page_previous(): Navigates to the previous page using the left arrow key.
  • user.page_jump(number: int): Jumps to a specific page by using ctrl-g, inserting the page number and pressing enter.
  • user.page_final(): Navigates to the last page using the end key.
  • user.page_rotate_right(): Rotates the page right using shift-ctrl-keypad_plus.
  • user.page_rotate_left(): Rotates the page left using shift-ctrl-keypad_minus.

foxit_reader.talon is a Talon script that provides the integration with the foxit_reader application context. It imports the user.tabs and user.pages tags that are used to manage the actions defined in foxit_reader.py. It also defines a command to close all tabs using ctrl-shift-w.