Bugfix: Why did changing the Tauri global shortcut from Cmd+Shift+V ...

Documentation for Sessions

🐛 Bugfix: Why did changing the Tauri global shortcut from Cmd+Shift+V ...

Date: 2026-02-26
Time: 19:14:51 UTC
Session: gspace1-144.15
Agent: angular
Confidence: 98%
Status: ✅ Documented


📋 Decision Context

Question:

Why did changing the Tauri global shortcut from Cmd+Shift+V to Cmd+Ctrl+V not work after the first attempt?

Task: Fix Vitto Desktop auth redirect and local dev workflow


🎯 Decision Made

Chosen:

The shortcut has TWO code locations that BOTH need updating: (1) the Shortcut::new() registration at line 352 and (2) the handler's shortcut.mods.contains() check at line 179. Only the registration was updated, so the key was captured but the handler silently ignored it because it was still checking for SHIFT.

Options Considered:

  1. Update both registration AND handler check (chosen)
  2. Use a shortcut ID instead of modifier comparison (cleaner but requires refactor)
  3. Store shortcut config in a const and reference it in both places (future improvement)

💭 Reasoning

ROOT CAUSE: Tauri's global_shortcut plugin uses a two-part pattern — a Builder that registers shortcuts and a handler callback that checks which shortcut fired. The registration (Shortcut::new(Modifiers::SUPER | Modifiers::CONTROL, Code::KeyV)) was updated to CONTROL, but the handler's match check (shortcut.mods.contains(Modifiers::SUPER | Modifiers::SHIFT)) was still comparing against SHIFT. Result: the OS captured Cmd+Ctrl+V correctly, dispatched it to the handler, but the handler's if is_vitto_hotkey check returned false — silently doing nothing. ALSO: macOS requires re-toggling Accessibility permission when the binary's code signature changes (app rebuild). Without this, global shortcuts fail silently with no log output. EARLY WARNING: When modifying Tauri shortcuts, always search for ALL references to the modifier constants — grep for both 'SHIFT' and 'SUPER.*SHIFT' across lib.rs.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation