feat(DemoType): rewrite to match ZoomIt behavior#37
Conversation
…ut, control keywords, segments Rewrites DemoTypeController to align with the actual ZoomIt DemoType implementation (microsoft/PowerToys src/modules/ZoomIt/ZoomIt/DemoType.cpp): - Input sources: clipboard ([start] prefix) → file path → dialog fallback - Control keywords: [end], [pause:N], [enter], [up], [down], [left], [right] - Segment navigation: [end] pauses, re-trigger hotkey resumes next segment - Escape to cancel (global event monitor) - Focus change detection → auto-cancel - Speed variance (±50% random per character for natural typing feel) - Settings: file path, speed slider (10-100ms), hotkey (⌃7) - Design doc: design/DemoType-en.md with full spec and implementation plan Phase 2 (user-driven mode with CGEvent tap) planned but not yet implemented.
- Add 300ms delay before typing in clipboard/file mode so target app is ready - Replace NSAlert with NSPanel for input dialog (NSAlert blocks Cmd+V) - Add Edit menu with Cut/Copy/Paste/SelectAll for modal panel - Use ModalHelper class for clean modal stop/confirm flow
There was a problem hiding this comment.
@yusufk The PR description says DemoType includes “Settings: file path, speed slider (10–100ms), hotkey (⌃7)”, but the current settings UI only exposes the DemoType hotkey in the General tab.
demoTypeFilePath, demoTypeSpeed, and demoTypeUserDriven are added to Settings, and DemoTypeController reads demoTypeFilePath / demoTypeSpeed, but there does not appear to be any settings screen or controls where users can configure the script file path, typing speed, or user-driven mode.
As a result, pressing ⌃7 falls back to the input dialog unless the clipboard starts with [start], because the file path remains empty by default.
This also means the PR does not yet satisfy the submission criteria we expect for this feature:
- Confirm feature compatibility with ZoomIt, including behavior and settings items
- Verify locally that the implemented behavior and settings work correctly
- Add user-facing documentation for the feature
Could you please either add the missing DemoType settings UI and documentation, then verify the full flow locally, or update the PR scope/description to clearly state what is implemented in this PR and what remains future work?
- DemoTypeTab: file path picker, speed slider (10-100ms), user-driven toggle - Added to SettingsView as new tab - docs/usage/demo-type.md: full usage guide with control keywords, segments - docs/ja/usage/demo-type.md: Japanese translation Addresses reviewer feedback: settings UI now exposes all DemoType configuration.
|
Apologies @07JP27 - updated the settings and readme to include the settings. |
Thank you. When it's ready, please re-request a review from me. |

Summary
Adds DemoType mode (⌃7) — synthesizes keystrokes from a script into the focused application, matching ZoomIt behavior. Supports file input, clipboard (
[start]prefix), control keywords ([end],[pause:N], arrow keys), segment navigation, and a dialog fallback for quick use.Type of Change
Acceptance Checklist
Screenshots / Recordings
Settings tab and dialog verified locally. DemoType types into any focused app with natural speed variance.
Related Issues / Notes for Reviewers
design/DemoType-en.mddocs/usage/demo-type.md+docs/ja/usage/demo-type.md