Skip to content

opera

This directory contains the Talon configuration files that provide support for the Opera web browser. It ensures that standard voice commands for tab manipulation, navigation, and web browsing map correctly to the appropriate keyboard shortcuts on Windows, macOS, and Linux.

Application Definition

The central entry point is opera.py, which defines how Talon identifies the Opera application across different operating systems:

  • macOS: Matches the bundle identifier com.operasoftware.Opera.
  • Windows: Matches the executable name opera.exe.
  • Linux: Matches the executable name opera.

Once the application is identified, opera.talon activates when Opera is the focused application. It assigns the standard tags browser and user.tabs to the application context. These tags expose a standard set of voice commands for browser navigation (such as going back or reloading) and tab management (such as switching or closing tabs).

Platform-Specific Implementations

Because keyboard shortcuts and browser behaviors differ across operating systems, platform-specific actions are handled by two dedicated context files:

These files override generic user, app, and browser actions. Key implementations include:

  • Tab Duplication: Since Opera lacks a direct keyboard shortcut for duplicating a tab, both platform files implement a custom sequence in tab_duplicate(). This routine focuses the address bar, copies the URL with brief safety delays, opens a new tab, and pastes/submits the URL.
  • Navigation & Utilities: Map platform-specific shortcuts for common actions such as showing downloads (ctrl-j on Windows/Linux vs. cmd-j on macOS), opening history, reloading, and opening extensions.
  • Unsupported / Configurable Actions: Both files raise NotImplementedError for actions that Opera does not support out of the box (like setting home pages) or actions that do not have default shortcuts but can be manually configured by the user (like jumping to the final tab).