Skip to content

notepad++

This directory provides Talon voice control support for Notepad++ on Windows.

Key Components

notepad++_win.py

This script defines the application context and overrides key Talon actions to match Notepad++'s native keyboard shortcuts on Windows.

It targets Notepad++ using the following application match criteria: * Application name: Notepad++ : a free (GNU) source code editor or Notepad++ : a free (GPL) source code editor * Executable: notepad++.exe

When Notepad++ is active, this script enables the following Talon tags: * user.find_and_replace — Allows finding and replacing text across single files or the entire project. * user.line_commands — Supports duplicating and moving lines. * user.tabs — Enables standard tab navigation.

Action Implementations

  • Application & Tab Control (app & user actions): Standardizes opening new tabs (ctrl-n), switching tabs (ctrl-pageup/ctrl-pagedown), and jumping directly to a tab number using keypad shortcuts (e.g., ctrl-keypad_1).
  • Editing & Navigation (edit actions): Implements line-level operations including line cloning (ctrl-d), swapping lines up/down (ctrl-shift-up/ctrl-shift-down), adjustments to indentation levels, and jumping directly to a specific line number.
  • Code Commenting (code actions): Handles block and line comment toggling via ctrl-q.
  • Window State (win actions): Parses the window title to extract and return the active file name.
  • Find and Replace (user actions): Maps common search actions to Notepad++'s dialogs. This includes matching case sensitivity (alt-c), whole words (alt-w), and regular expressions (alt-g), alongside project-wide file search and replace (ctrl-shift-f).