Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I custom the keymaps? #2552

Closed
JavaZeroo opened this issue Oct 9, 2024 · 1 comment
Closed

How can I custom the keymaps? #2552

JavaZeroo opened this issue Oct 9, 2024 · 1 comment

Comments

@JavaZeroo
Copy link

I can't find any documentation on keymaps.

I want to set Ctrl+c to "Copy when selected, then uncheck. Send Ctrl+c to interrupt the program when nothing is selected". Just like Windows Terminal.

@JavaZeroo
Copy link
Author

  { "keys": "<Ctrl+C>",
    "modes": "remote",
    "when": "window.activeText.isSelectionEmpty() == false",
    "script": "() => { window.activeText.copy(); window.activeText.cancelSelection() }"
  },

global/wind.keymaps 中 添加以上代码

同时修改Ctrl+V的配置

  { "keys": "<Ctrl+V>",
    "modes": "normal, local, remote",
    "action": "Text.Paste"
  },

这样就可以和Windows Terminal 的行为一致了:选中的时候Ctrl+C复制,然后清空取消选中。如果没有选中则会将Ctrl+c发送给shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@JavaZeroo and others