Skip to content

Ctrl+C does not copy text from Commit Failed modal on Windows #22591

Open

Description

@anthfgreco

The problem

In the Commit Failed modal, I can select the hook output, but pressing Ctrl+C does not copy it.

Ctrl+Insert does copy the selected text successfully.

This appears related to #21785 and the fix in #21728, but the standard copy shortcut still does not work on Windows.

Version

GitHub Desktop 3.6.3 (x64)

Operating system

Windows 11

Steps to reproduce

  1. Configure a pre-commit hook that prints output and exits with a failure.
  2. Attempt a commit in GitHub Desktop.
  3. Select text in the Commit Failed modal.
  4. Press Ctrl+C.
  5. Paste somewhere and confirm the clipboard was not updated.
  6. Repeat using Ctrl+Insert; the selected text copies successfully.

Expected behavior

Ctrl+C should copy the selected hook output, consistent with standard Windows copy behavior.

Actual behavior

Only Ctrl+Insert copies the selected output.

Release version

GitHub Desktop 3.6.3 (x64)

Operating system

Windows 11

Steps to reproduce the behavior

No response

Log files

No response

Screenshots

No response

Additional context

No response

Activity

  1. desktop-triage commented on Jul 22, 2026

    @desktop-triage

    Suggesting labels bug, windows, and priority-3: the issue provides clear reproduction steps showing Ctrl+C fails to copy while Ctrl+Insert succeeds, pointing to an incomplete keyboard shortcut fix from #21728 that is specific to Windows. Issue #21785 (the original "unable to copy" report) was closed as completed after #21728, but this is a distinct follow-up where copying partially works — Ctrl+C is simply not handled on Windows in this context.

    Generated by Issue Triage (skills-driven) for #22591 · 21.5 AIC · ⌖ 5.6 AIC · ⊞ 5.2K · ◷

  2. babakks commented on Jul 24, 2026

    @babakks
    Member

    Thanks for reporting this, @anthfgreco! 🙏

    I could reproduce your experience on 3.6.4-beta1 on a Windows 11 VM, so I'm going to label this is a P3 bug.


    Repro

    1. Create a new local repository and set up a failing pre-commit hook: (in git bash)
      # prepare repo
      mkdir test-repo
      cd test-repo
      git init
      echo Hey > hello.txt
      git add hello.txt
      git commit -m 'initial commit'
      # add pre-commit hook
      cp .git/hooks/pre-commit.sample .git/hooks/pre-commit
      cat << EOF > .git/hooks/pre-commit
      #!/usr/bin/bash
      echo 'oops!'
      exit 1
      EOF
      # modify worktree
      echo >> hello.txt
    2. Open the repo in GitHub Desktop and click on Commit....
    3. In the error message modal, select the error message and press Ctrl+C.
    4. Try pasting into a text editor and observe the error message is not copied.
  3. added
    bug
    priority-3
    on Jul 24, 2026
  4. added a commit that references this issue on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions