feat: bind ctrl+c and ctrl+v in ghostty #49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/ghostty-ctrl-bindings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changes
Replaces the Ghostty clipboard bindings in
roles/ghosttywith physical-keytriggers:
ctrl+shift+key_v=paste_from_clipboard→ctrl+key_v=paste_from_clipboardctrl+shift+key_c=copy_to_clipboard→performable:ctrl+key_c=copy_to_clipboardkey_v/key_care W3C physical key names, so they match the V/C keysregardless of the active keyboard layout. Plain Unicode triggers (
ctrl+v,ctrl+c) are layout-dependent: on a Russian layout the keys produceм/с,so the bindings do not match (Ghostty issue #15110).
performable:still makes Ctrl+C consume the input only when there is aselection; without a selection Ghostty falls back to normal key encoding, so
Ctrl+C is delivered to the application as SIGINT in legacy encoding.
Rollout
Applied to
desktop_alekseiwith--tags ghostty; the role reportedchanged=1for the rendered config./home/aleksei/.config/ghostty/config.ghosttynow contains:
The running Ghostty instance needs a config reload with
Ctrl+Shift+,(thedefault
reload_configbinding) or a restart.Verification
ansible-playbook --syntax-check playbooks/desktop_aleksei.yamlpasses.dprint checkpasses.config.ghosttycontains the two physical-key bindings.aleksei:alekseiwith mode0644.Note: if an application enables the Kitty keyboard protocol, Ctrl+C without a
selection may still be reported as a CSI u sequence instead of SIGINT; that is
a separate Ghostty/kitty-protocol limitation. A dedicated Cyrillic binding can
force SIGINT, but it would replace conditional copy in that layout.