Skip to content

In kitty, Cmd+C/X/Z and the other macOS shortcuts work in TuiCode #444

Closed

Description

@a-team-app

Context

On macOS in kitty, Cmd+C/Cmd+X are taken by the terminal, so they copy kitty's selection, not TuiCode's. kitty can remap keys only while a program that sets a user variable is focused (map --when-focus-on var:TUICODE_ACTIVE=1 …, docs), and TuiCode already sets that variable for WezTerm. This adds a kitty integration like the WezTerm one. Part of #40.

Acceptance criteria

  • In kitty on macOS, Settings → Terminal shows Detected terminal: kitty, Status: Not installed and an Install Button.
  • After Install, the panel shows Status: Installed, tells you to add include tuicode.conf to ~/.config/kitty/kitty.conf and reload kitty's config, and shows Reinstall and Remove Buttons.
  • With that line added and the config reloaded, Cmd+C, Cmd+X, Cmd+Z, Cmd+A, Cmd+arrows and the other shortcuts the WezTerm integration maps do the same in TuiCode as they do in WezTerm.
  • In the shell after quitting TuiCode, and in other kitty windows, those keys do what kitty normally does.
  • Remove deletes the file and the panel goes back to Status: Not installed; a leftover include line doesn't stop kitty starting.
  • tuicode --install-terminal-integration installs it when run in kitty, as it does for the other terminals.
  • After a TuiCode upgrade that changes the mappings, the panel shows the older-version status and an update Button.

Tests

  • The generated tuicode.conf: every mapping gated on the user variable, and the same key set as the WezTerm integration.
  • Detection (kitty's environment variables) and status: not installed, installed, stale version.
  • Install, reinstall and remove against a temp config dir.
  • Panel state for kitty, including the post-install instructions.

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-team:devClaimed by the a-team Dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions