pass through ⌘C & ⌘V to terminal progam #6882
The problemMy ultimate goal is to be able to remap the key combinations First, when running Press and release
|
Replies: 2 comments
|
You map them to no-op not send-text
…On Sat, Dec 02, 2023 at 10:36:27AM -0800, David Whetstone wrote:
## The problem
My ultimate goal is to be able to remap the key combinations `⌘C` and `⌘V` in Neovim running in Kitty, but that may or may not be relevant to the discussion.
First, when running `show-key` and pressing the usual clipboard key combos `⌘C`, `⌘V`, and `⌘X`, by default only `⌘X` outputs anything.
```
kitty --config=NONE --debug-input kitty +kitten show_key -m kitty
```
### Press and release `⌘C`:
```
super+LEFT_SUPER PRESS
CSI 57444 ; 9 u
LEFT_SUPER RELEASE
CSI 57444 ; 1 : 3 u
```
### Press and release `⌘V`:
```
super+LEFT_SUPER PRESS
CSI 57444 ; 9 u
LEFT_SUPER RELEASE
CSI 57444 ; 1 : 3 u
```
### Press and release `⌘X`:
```
super+LEFT_SUPER PRESS
CSI 57444 ; 9 u
super+x PRESS
CSI 120 ; 9 u
super+x RELEASE
CSI 120 ; 9 : 3 u
LEFT_SUPER RELEASE
CSI 57444 ; 1 : 3 u
```
As you can see, only `⌘X` outputs the correct sequences.
## Attempted solution
So I followed some suggestions I found here in the discussions and added this to my `kitty.conf`:
```
map cmd+c send_text all \x1b[99;9u
map cmd+v send_text all \x1b[118;9u
```
Which I believe are the correct sequences. Now when running `show-key` and pressing `⌘C` & `⌘V`, I do get press events, but no release events.
```
kitty --debug-input kitty +kitten show_key -m kitty
```
### Press and release `⌘C`:
```
super+LEFT_SUPER PRESS
CSI 57444 ; 9 u
super+c PRESS
CSI 99 ; 9 u
LEFT_SUPER RELEASE
CSI 57444 ; 1 : 3 u
```
### Press and release `⌘V`:
```
super+LEFT_SUPER PRESS
CSI 57444 ; 9 u
super+v PRESS
CSI 118 ; 9 u
LEFT_SUPER RELEASE
CSI 57444 ; 1 : 3 u
```
As you can see, I get press events for `⌘C` & `⌘V`, but no release events. While for `⌘X` I get both press and release with no custom configuration required.
## What should I do?
First, why the disparity between `⌘X` (which outputs sequences without any customization required) and `⌘C` & `⌘V` (which output nothing without customization).
Second, why are the release events missing for `⌘C` & `⌘V`?
--
Reply to this email directly or view it on GitHub:
#6882
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
--
_____________________________________
Dr. Kovid Goyal
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________
|
|
Ha! That was the first thing I tried when I was working on the original problem in neovim, but before I discovered the However, it doesn't solve my original problem, but that's no fault with Kitty. Thanks for your help. |
Ha! That was the first thing I tried when I was working on the original problem in neovim, but before I discovered the
show_keytest. I neglected to go back and check it again, and of course, it works!However, it doesn't solve my original problem, but that's no fault with Kitty. Thanks for your help.