warpdotdev / warpdotdev/warp

Custom Keyboard Shortcut for "Copy" does not copy selected command text, only command output

Open
#3,558 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:settings-keybindings bug ready-to-implement triaged
Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

Discord username (optional)

No response

Describe the bug

I would like to override the Cmd+C default Mac "Copy" command with the Windows/Linux version, Ctrl+C, mainly because that's what I'm used to. Right now, there doesn't appear to be a way to do that.

To reproduce

In Settings->Keyboard Shortcuts, define the Copy command as such:

image

Note, for some reason if you define a shortcut for Copy, it sets the same shortcut to Copy Command and Output. This might be related to this issue. Because of this, it appears they conflict in the UI but I'm not sure if it matters.

Next, go type in a command and select part of it:

image

Then, press Ctrl+C to copy the text.

Result:

The selected text is NOT copied to the clipboard. Using the OS default Cmd+C will work still.

Note, the context menu will even show the keyboard binding is supposed to work:

image

Also note the keyboard binding will work to copy the actual output of a command:

image

Expected behavior

If I use Ctrl+C as a custom keyboard shortcut for Copy, I should be able to use that shortcut to copy selected text within the command input.

Screenshots

No response

Operating system

MacOS

Operating system and version

13.4.1

Shell Version

zsh 5.9 (x86_64-apple-darwin22.0)

Current Warp version

v0.2023.08.15.08.03.stable_00

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

N/A, the issue only applies to a Warp specific feature. (i.e. Warp AI, Workflows)

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior from Settings → Keyboard Shortcuts by assigning Ctrl+C to Copy, then select command-input text and compare it with copying command output and using the context menu. Trace how the Copy and Copy Command and Output bindings are registered and dispatched; done means the custom Copy binding copies selected command text without breaking output copying.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
cli, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.