Skip to content

Add setting to hide clipboard text in command palette#7

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-6
Draft

Add setting to hide clipboard text in command palette#7
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-6

Conversation

Copy link
Copy Markdown

Copilot AI commented Sep 3, 2025

This PR adds a new privacy-focused setting that allows users to hide clipboard content when displayed in the PowerToys Command Palette. This addresses security concerns when screen sharing or recording videos, preventing accidental exposure of sensitive information like passwords.

Changes Made

New Features

  • Settings system: Added a Settings.cs class with a HideClipboardText boolean property (defaults to false for backward compatibility)
  • Toggle command: Created ToggleHideClipboardCommand.cs that allows users to easily toggle the setting on/off with visual feedback
  • Smart text hiding: Modified TypeInputCommand.cs to conditionally hide clipboard text while preserving user-typed input visibility

How It Works

  • By default, clipboard text is displayed normally (maintains existing behavior)
  • Users can access "Hide Clipboard Text: OFF/ON" from the Input Typer extension commands
  • When enabled, clipboard commands show Type (Clipboard): '[hidden]' instead of the actual clipboard content
  • User-typed text (non-clipboard) is never hidden, ensuring full functionality is preserved
  • The setting persists during the current session

Example Usage

Before (clipboard contains "mypassword123"):
Type (Clipboard): 'mypassword123'

After enabling hide setting:
Type (Clipboard): '[hidden]'

User input remains unchanged:
Type: 'user entered text'

The implementation uses minimal, surgical changes - only 4 files modified with 56 lines added and 1 line changed. The solution specifically targets clipboard commands by detecting the "Clipboard" prefix, ensuring that only sensitive clipboard content is hidden while maintaining the extension's core functionality.

Fixes #6.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Sep 3, 2025
Copy link
Copy Markdown
Author

Copilot AI commented Sep 3, 2025

@CoreyHayward 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Co-authored-by: CoreyHayward <72159232+CoreyHayward@users.noreply.github.com>
Copilot AI changed the title [WIP] Add a setting to hide what is going to be typed in the command palette Add setting to hide clipboard text in command palette Sep 3, 2025
Copilot AI requested a review from CoreyHayward September 3, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a setting to hide what is going to be typed in the command palette

2 participants