visualstudio
This directory contains the Talon configuration and action definitions to enable voice control for Microsoft Visual Studio on Windows (specifically targeting Visual Studio 2019, 2022, and the devenv.exe process).
The files in this directory work together to map standard voice-controlled actions (like navigation, searching, and debugging) to Visual Studio's keyboard shortcuts.
How the Files Work Together
The configuration is divided into application and context definition files in Python, and a voice command mapping file in Talon.
-
visual_studio.py: This is the core module that defines the Visual Studio application matching rules on Windows. It also overrides and implements standard Talon action classes for the editor:
app: Tab management commands (close, next, previous, reopen).edit: Indentation, cloning lines, swapping lines, and jumping to specific line numbers.win: Extracts the active filename from the window title.user: Implements custom search, replace, and multi-cursor actions.- Note on Extensions: To make full use of the features implemented in this file, certain Visual Studio extensions are recommended:
- Window title tracking (required for filename discovery) works best with the RenameVisualStudioWindowTitle extension.
- Multi-cursor support requires the MultiCaretBooster extension.
-
visual_studio_win.py: This file provides context-specific action overrides that explicitly target Windows instances of Visual Studio. It implements core navigation operations, basic editing tasks, and maps the multi-cursor commands to their equivalent Windows/VS extension shortcuts (e.g.,
shift-alt-downto add a cursor below). -
visual_studio.talon: This file maps spoken commands to keyboard shortcuts when Visual Studio is the active application window. It activates several built-in Talon tags, including:
user.tabsuser.line_commandsuser.find_and_replaceuser.multiple_cursorsuser.command_client
The
.talonfile exposes voice controls for: * Panels: Show or hide the solution explorer, properties, output, and breakpoints window. * File Operations: Search for files (file hunt), rename files, or locate them in the directory structure. * Refactoring & Language Features: Quick commands to show definitions, peek references, format files/selections, fix imports, and trigger standard refactoring methods. * Code Navigation: Backwards/forwards movement, jumping to members, type definitions, and manipulating bookmarks. * Debugging: Voice macros for stepping over (step over), stepping in (debug step into), starting/continuing execution, and toggling breakpoints.