Files
calctext/_bmad-output/implementation-artifacts/8-5-global-hotkey-quickcalc.md
2026-03-16 19:54:53 -04:00

46 lines
1.6 KiB
Markdown

---
epic: 8
story: 8.5
title: "Global Hotkey (QuickCalc)"
status: draft
---
## Epic 8 — Windows App (Rust + iced)
**Goal:** Fast, lightweight native Windows app -- single .exe, no runtime dependencies.
### Story 8.5: Global Hotkey (QuickCalc)
As a **Windows user**,
I want a configurable global hotkey that opens a floating QuickCalc panel,
So that I can type a quick calculation, copy the result, and dismiss without leaving my current workflow.
**Acceptance Criteria:**
**Given** the default configuration
**When** the user presses Alt+Space from any application
**Then** a floating QuickCalc window appears centered on the active monitor
**Given** the QuickCalc window is open
**When** the user types a calculation (e.g., `1920 / 3`)
**Then** the result `640` is displayed immediately
**Given** the QuickCalc window shows a result
**When** the user presses Ctrl+C
**Then** the result value is copied to the Windows clipboard
**Given** the user has copied a result
**When** the user presses Escape
**Then** the QuickCalc window dismisses and focus returns to the previously active application
**Given** the user wants to change the hotkey
**When** the user opens CalcPad settings and configures a new shortcut
**Then** the old hotkey is unregistered via `UnregisterHotKey` and the new one is registered via `RegisterHotKey`
**Given** the configured hotkey conflicts with an existing system or application hotkey
**When** `RegisterHotKey` fails
**Then** the user is notified of the conflict and prompted to choose an alternative
**Given** the QuickCalc window is open
**When** the user clicks outside the window
**Then** the window dismisses (loses focus behavior)