Skip to content

Questions about copy/kill and paste/yank default keybindings and behavior in char-mode and semi-char-mode #457

Description

@papercatlol

Ghostty

C-k/C-w/C-u kills text inside terminal, C-y yanks it back, M-y cycles kill-ring

Dragging the mouse while holding mouse-1 selects text (primary selection)

mouse-2 or S-<insert> pastes primary selection

C-S-c copies primary selection to clipboard
C-S-v pastes from clipboard

Char mode

C-k/C-w/C-u/C-y/M-y same as Ghostty (nice!)

Mouse does nothing
S-<insert> inserts '2~'

C-S-c gets translated to C-c
C-S-v gets translated to C-v

Semi-char mode

C-k/C-w kills text inside terminal (but you can only paste it from char-mode)
C-y/S-<insert> yanks from emacs kill-ring, M-y cycles emacs kill-ring
C-u is used for emacs prefix-arg

Dragging the mouse while holding mouse-1 selects text and enters copy-mode
<mouse-2> pastes primary selection

C-S-c gets translated to C-c
C-S-v gets translated to C-v


So Ghostty supports

  • in-terminal kill/yank
  • primary selection via mouse + can paste using keyboard
  • system clipboard copy/paste

Char mode supports

  • in-terminal kill/yank

Semi-char mode supports

  • in-terminal kill (but not yank!)
  • primary selection via mouse
  • emacs clipboard paste (but to copy you need to switch to copy-mode unless I'm missing something)

Char mode is at least consistent, but semi-char is just bizarre.
C-w/C-k kills stuff but you have to switch to another mode to yank it, while
C-y yanks emacs stuff but you have to switch to another mode to copy.

What is the vision/expected workflow here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions