-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
"ctrl + v" inserts clipboard content instead of showing key bindings when checking "what-is-key" #11121
Comments
Could you share your settings.json file? |
The only change make was adding "debugFeature: true" option. The bug reproduces with/without this option. Here's the file content for reference: {
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command": "paste",
"keys": "ctrl+v"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"keys": "alt+shift+d"
}
],
"copyFormatting": "none",
"copyOnSelect": false,
"debugFeatures": true,
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols": 120,
"initialRows": 30,
"profiles":
{
"defaults": {},
"list":
[
{
"commandline": "powershell.exe",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell"
},
{
"commandline": "cmd.exe",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
},
{
"guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
"hidden": false,
"name": "Git Bash",
"source": "Git"
}
]
},
"schemes":
[
{
"background": "#0C0C0C",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cursorColor": "#FFFFFF",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell",
"purple": "#881798",
"red": "#C50F1F",
"selectionBackground": "#FFFFFF",
"white": "#CCCCCC",
"yellow": "#C19C00"
},
{
"background": "#012456",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cursorColor": "#FFFFFF",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell Powershell",
"purple": "#881798",
"red": "#C50F1F",
"selectionBackground": "#FFFFFF",
"white": "#CCCCCC",
"yellow": "#C19C00"
},
{
"background": "#282C34",
"black": "#282C34",
"blue": "#61AFEF",
"brightBlack": "#5A6374",
"brightBlue": "#61AFEF",
"brightCyan": "#56B6C2",
"brightGreen": "#98C379",
"brightPurple": "#C678DD",
"brightRed": "#E06C75",
"brightWhite": "#DCDFE4",
"brightYellow": "#E5C07B",
"cursorColor": "#FFFFFF",
"cyan": "#56B6C2",
"foreground": "#DCDFE4",
"green": "#98C379",
"name": "One Half Dark",
"purple": "#C678DD",
"red": "#E06C75",
"selectionBackground": "#FFFFFF",
"white": "#DCDFE4",
"yellow": "#E5C07B"
},
{
"background": "#FAFAFA",
"black": "#383A42",
"blue": "#0184BC",
"brightBlack": "#4F525D",
"brightBlue": "#61AFEF",
"brightCyan": "#56B5C1",
"brightGreen": "#98C379",
"brightPurple": "#C577DD",
"brightRed": "#DF6C75",
"brightWhite": "#FFFFFF",
"brightYellow": "#E4C07A",
"cursorColor": "#4F525D",
"cyan": "#0997B3",
"foreground": "#383A42",
"green": "#50A14F",
"name": "One Half Light",
"purple": "#A626A4",
"red": "#E45649",
"selectionBackground": "#FFFFFF",
"white": "#FAFAFA",
"yellow": "#C18301"
},
{
"background": "#002B36",
"black": "#002B36",
"blue": "#268BD2",
"brightBlack": "#073642",
"brightBlue": "#839496",
"brightCyan": "#93A1A1",
"brightGreen": "#586E75",
"brightPurple": "#6C71C4",
"brightRed": "#CB4B16",
"brightWhite": "#FDF6E3",
"brightYellow": "#657B83",
"cursorColor": "#FFFFFF",
"cyan": "#2AA198",
"foreground": "#839496",
"green": "#859900",
"name": "Solarized Dark",
"purple": "#D33682",
"red": "#DC322F",
"selectionBackground": "#FFFFFF",
"white": "#EEE8D5",
"yellow": "#B58900"
},
{
"background": "#FDF6E3",
"black": "#002B36",
"blue": "#268BD2",
"brightBlack": "#073642",
"brightBlue": "#839496",
"brightCyan": "#93A1A1",
"brightGreen": "#586E75",
"brightPurple": "#6C71C4",
"brightRed": "#CB4B16",
"brightWhite": "#FDF6E3",
"brightYellow": "#657B83",
"cursorColor": "#002B36",
"cyan": "#2AA198",
"foreground": "#657B83",
"green": "#859900",
"name": "Solarized Light",
"purple": "#D33682",
"red": "#DC322F",
"selectionBackground": "#FFFFFF",
"white": "#EEE8D5",
"yellow": "#B58900"
},
{
"background": "#000000",
"black": "#000000",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
"brightRed": "#EF2929",
"brightWhite": "#EEEEEC",
"brightYellow": "#FCE94F",
"cursorColor": "#FFFFFF",
"cyan": "#06989A",
"foreground": "#D3D7CF",
"green": "#4E9A06",
"name": "Tango Dark",
"purple": "#75507B",
"red": "#CC0000",
"selectionBackground": "#FFFFFF",
"white": "#D3D7CF",
"yellow": "#C4A000"
},
{
"background": "#FFFFFF",
"black": "#000000",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
"brightRed": "#EF2929",
"brightWhite": "#EEEEEC",
"brightYellow": "#FCE94F",
"cursorColor": "#000000",
"cyan": "#06989A",
"foreground": "#555753",
"green": "#4E9A06",
"name": "Tango Light",
"purple": "#75507B",
"red": "#CC0000",
"selectionBackground": "#FFFFFF",
"white": "#D3D7CF",
"yellow": "#C4A000"
},
{
"background": "#000000",
"black": "#000000",
"blue": "#000080",
"brightBlack": "#808080",
"brightBlue": "#0000FF",
"brightCyan": "#00FFFF",
"brightGreen": "#00FF00",
"brightPurple": "#FF00FF",
"brightRed": "#FF0000",
"brightWhite": "#FFFFFF",
"brightYellow": "#FFFF00",
"cursorColor": "#FFFFFF",
"cyan": "#008080",
"foreground": "#C0C0C0",
"green": "#008000",
"name": "Vintage",
"purple": "#800080",
"red": "#800000",
"selectionBackground": "#FFFFFF",
"white": "#C0C0C0",
"yellow": "#808000"
}
]
} |
right there in your settings: {
"command": "paste",
"keys": "ctrl+v"
}, Curious though that pasting without any clipboard contents still sends the Ctrl+V to PsReadline. |
If I understand correctly these are your steps:
Please try again and add some content to the clipboard before step 5. I was able to reproduce, however at step 6 I don't have any output, no matter how may times I press ctrl+v, clipboard being empty. Here's a screenshot for reference: My steps are slightly different:
At step 2 (after alt+shift+/) key z was pressed. Pressing any key at step 2 (after "what-is-key") returns the key followed by "SelfInsert - Insert the key typed" string. At step 4 some content was added to the clipboard. Then at step 7 after entering alt+shift+/ followed by ctrl+v results in line 8 & 9. Here's a screenshot for reference: I don't have any modified PS profiles. And this is the keyboard info:
It could be my setup. Please close. |
Quick update: on same setup if "what-is-key" is run in a PS session outside WT it works as expected:
|
FWIW: on a system with Win11 ver. 10.0.22454.0 and WT ver. 1.11.2421.0 after enabling "debugFeatures" this is the sequence of keys: ␛[?9001h␛[2J␛[m␛[HWindows␣PowerShell␍␊Copyright␣(C)␣Microsoft␣Corporation.␣All␣rights␣reserved.␛[4;1HInstall␣the␣latest␣PowerShell␣for␣new␣features␣and␣improvements!␣https://aka.ms/PSWindows␛]0;Windows␣PowerShell␇␛[?25h␛[?25l␛[7;1H␛[?25hPS␣C:\Users\Tux>␣␛[83;31;115;1;0;1_␛[83;31;115;0;0;1_␛[?25l␛[93ms␛[?25h␛[69;18;101;1;0;1_␛[69;18;101;0;0;1_␛[m␛[?25l␛[93m␈se␛[?25h␛[84;20;116;1;0;1_␛[84;20;116;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset␛[?25h␛[189;12;45;1;0;1_␛[189;12;45;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-␛[?25h␛[67;46;99;1;0;1_␛[67;46;99;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-c␛[?25h␛[76;38;108;1;0;1_␛[76;38;108;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-cl␛[?25h␛[73;23;105;1;0;1_␛[73;23;105;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-cli␛[?25h␛[80;25;112;1;0;1_␛[80;25;112;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-clip␛[?25h␛[66;48;98;1;0;1_␛[66;48;98;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-clipb␛[?25h␛[79;24;111;1;0;1_␛[79;24;111;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-clipbo␛[?25h␛[65;30;97;1;0;1_␛[65;30;97;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-clipboa␛[?25h␛[82;19;114;1;0;1_␛[82;19;114;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-clipboar␛[?25h␛[68;32;100;1;0;1_␛[68;32;100;0;0;1_␛[m␛[?25l␛[93m␛[7;18Hset-clipboard␛[?25h␛[13;28;13;1;0;1_␛[13;28;13;0;0;1_␛[m␍␊PS␣C:\Users\Tux>␣␛[18;56;0;1;2;1_␛[16;42;0;1;18;1_␛[191;53;63;1;18;1_␛[?25l␍␊what-is-key:␣␛[8;18H␛[?25h␛[191;53;63;0;18;1_␛[16;42;0;0;2;1_␛[18;56;0;0;0;1_␛[90;44;122;1;0;1_␛[90;44;122;0;0;1_␍␊z:␣SelfInsert␣-␣Insert␣the␣key␣typed␍␊PS␣C:\Users\Tux>␣␛[83;31;115;1;0;1_␛[83;31;115;0;0;1_␛[?25l␛[93ms␛[?25h␛[69;18;101;1;0;1_␛[69;18;101;0;0;1_␛[m␛[?25l␛[93m␈se␛[?25h␛[84;20;116;1;0;1_␛[84;20;116;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset␛[?25h␛[189;12;45;1;0;1_␛[189;12;45;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-␛[?25h␛[67;46;99;1;0;1_␛[67;46;99;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-c␛[?25h␛[76;38;108;1;0;1_␛[76;38;108;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-cl␛[?25h␛[73;23;105;1;0;1_␛[73;23;105;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-cli␛[?25h␛[80;25;112;1;0;1_␛[80;25;112;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-clip␛[?25h␛[66;48;98;1;0;1_␛[66;48;98;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-clipb␛[?25h␛[79;24;111;1;0;1_␛[79;24;111;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-clipbo␛[?25h␛[65;30;97;1;0;1_␛[65;30;97;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-clipboa␛[?25h␛[82;19;114;1;0;1_␛[82;19;114;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-clipboar␛[?25h␛[68;32;100;1;0;1_␛[68;32;100;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-clipboard␛[?25h␛[32;57;32;1;0;1_␛[32;57;32;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[?25h␛[84;20;116;1;0;1_␛[84;20;116;0;0;1_␛[m␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mt␛[?25h␛[69;18;101;1;0;1_␛[69;18;101;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mte␛[?25h␛[83;31;115;1;0;1_␛[83;31;115;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mtes␛[?25h␛[84;20;116;1;0;1_␛[84;20;116;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mtest␛[?25h␛[73;23;105;1;0;1_␛[73;23;105;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mtesti␛[?25h␛[78;49;110;1;0;1_␛[78;49;110;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mtestin␛[?25h␛[71;34;103;1;0;1_␛[71;34;103;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mtesting␛[?25h␛[49;2;49;1;0;1_␛[49;2;49;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mtesting1␛[?25h␛[50;3;50;1;0;1_␛[50;3;50;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mtesting12␛[?25h␛[51;4;51;1;0;1_␛[51;4;51;0;0;1_␛[?25l␛[93m␛[10;18Hset-clipboard␣␛[mtesting123␛[?25h␛[13;28;13;1;0;1_␛[13;28;13;0;0;1_␍␊PS␣C:\Users\Tux>␣␛[71;34;103;1;0;1_␛[71;34;103;0;0;1_␛[?25l␛[93mg␛[?25h␛[69;18;101;1;0;1_␛[69;18;101;0;0;1_␛[m␛[?25l␛[93m␈ge␛[?25h␛[84;20;116;1;0;1_␛[84;20;116;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget␛[?25h␛[189;12;45;1;0;1_␛[189;12;45;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-␛[?25h␛[67;46;99;1;0;1_␛[67;46;99;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-c␛[?25h␛[76;38;108;1;0;1_␛[76;38;108;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-cl␛[?25h␛[73;23;105;1;0;1_␛[73;23;105;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-cli␛[?25h␛[80;25;112;1;0;1_␛[80;25;112;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clip␛[?25h␛[80;25;112;1;0;1_␛[80;25;112;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipp␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clip␣␈␛[?25h␛[66;48;98;1;0;1_␛[66;48;98;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipb␛[?25h␛[80;25;112;1;0;1_␛[80;25;112;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipbp␛[?25h␛[65;30;97;1;0;1_␛[65;30;97;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipbpa␛[?25h␛[82;19;114;1;0;1_␛[82;19;114;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipbpar␛[?25h␛[68;32;100;1;0;1_␛[68;32;100;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipbpard␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipbpar␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipbpa␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipbp␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipb␣␈␛[?25h␛[79;24;111;1;0;1_␛[79;24;111;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipbo␛[?25h␛[65;30;97;1;0;1_␛[65;30;97;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipboa␛[?25h␛[82;19;114;1;0;1_␛[82;19;114;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipboar␛[?25h␛[68;32;100;1;0;1_␛[68;32;100;0;0;1_␛[m␛[?25l␛[93m␛[11;18Hget-clipboard␛[?25h␛[13;28;13;1;0;1_␛[13;28;13;0;0;1_␛[m␍␊testing123␍␊PS␣C:\Users\Tux>␣␛[18;56;0;1;2;1_␛[16;42;0;1;18;1_␛[191;53;63;1;18;1_␛[?25l␍␊what-is-key:␣␛[13;18H␛[?25h␛[191;53;63;0;18;1_␛[18;56;0;0;16;1_␛[16;42;0;0;0;1_␛[17;29;0;1;8;1_testing123␍␊t:␣SelfInsert␣-␣Insert␣the␣key␣typed␍␊PS␣C:\Users\Tux>␣␛[93mesting123␛[17;29;0;0;0;1_␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[15;18Hesting12␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[15;18Hesting1␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[15;18Hesting␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[15;18Hestin␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[15;18Hesti␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[15;18Hest␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[15;18Hes␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␛[93m␛[15;18He␣␈␛[?25h␛[8;14;8;1;0;1_␛[8;14;8;0;0;1_␛[m␛[?25l␈␣␈␛[?25h␛[67;46;99;1;0;1_␛[67;46;99;0;0;1_␛[?25l␛[93mc␛[?25h␛[76;38;108;1;0;1_␛[76;38;108;0;0;1_␛[m␛[?25l␛[93m␈cl␛[?25h␛[83;31;115;1;0;1_␛[83;31;115;0;0;1_␛[m␛[?25l␛[93m␛[15;18Hcls␛[?25h␛[13;28;13;1;0;1_␛[13;28;13;0;0;1_␛[m␍␊␛[?25l␛[H␛[?25h␛[?25l␛[3JPS␣C:\Users\Tux>␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␛[1;18H␛[?25h␁␛[?25l␛[?25h Sorry for the long post. |
For what it's worth...
When I press alt+shift+\ and then ctrl+v, it gives me what looks like the right answer: For now, I'm gonna close this one out as a potential local issue. Ctrl+V has been an annoying key binding on a number of levels, but it should be fairly easily rebindable at the Terminal and PSReadline layers. Thanks for filing, and sorry for the delay :) |
Windows Terminal version (or Windows build number)
10.0.22000.0 1.10.2383.0
Other Software
No response
Steps to reproduce
Expected Behavior
Display what "ctrl+v" does, i.e. "SelfInsert - Insert the key typed"
Actual Behavior
Sample session:
On line 3 key Z was pressed after no response from "ctrl+v" combination.
On line 9 the first character of the content in the clipboard T ("Test" was set on line 5) is followed by the SelfInsert string, and the PS prompt shows the remaining clipboard content ("est" on line 10).
This was tested with a small clipboard content. It gets messy pretty fast with large clipboard contents.
This bug was inspired by issue #11106
The text was updated successfully, but these errors were encountered: