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

Unable use Ctrl+L hotkey clear screen in VSCode Terminal using Remote - WSL #704

Open
doggy8088 opened this issue Aug 23, 2021 · 9 comments
Labels
Bug This is a problem.

Comments

@doggy8088
Copy link

Describe the bug

I opened a project from WSL using Pengwin Linux and VSCode. After VSCode opened, I can't hit Ctrl+L clear screen in the Terminal. If I use Ubuntu 20.04 in WSL, there is no problem at all.

To Reproduce
Steps to reproduce the behavior:

  1. Open WSL 2 (Pengwin)

  2. mkdir build

  3. code .

  4. Open Terminal

  5. ls

  6. Hit Ctrl+L clear screen, you will see this:

    image

Expected behavior

It should clear screen in the Terminal window.

Screenshots

image

Additional context

N/A

Basic Troubleshooting Checklist

[x] I have searched Google for the error message.
[x] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled.
[x] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues.
[x] I have searched the Pengwin issues page: https://github.com/WhitewaterFoundry/Pengwin/issues.
[x] I have run Windows 10 updates and restarted.
[x] I have restarted WSL service: wsl.exe --terminate WLinux wsl.exe --shutdown.

What other troubleshooting have you attempted?

I don't know what else I can try.

Pengwin Version

Run grep "PENGWIN_VERSION" /etc/os-release in Pengwin.

PENGWIN_VERSION="21.7.1"

WSL general info

Run wslsys in Pengwin.

WSL Version: 2
Locale: zh_TW
Release Install Date: Wed May 20 15:08:43 CST 2020
Branch: vb_release
Build: 19043
Full Build: 19041.1.amd64fre.vb_release.191206-1406
Display Scaling: 1.5
Windows Theme: dark
Windows Uptime: 9d 12h 12m
WSL Uptime: 5d 12h 22m
WSL Release: Pengwin
WSL Kernel: Linux 5.10.16.3-microsoft-standard-WSL2
Packages Count: 528
@doggy8088 doggy8088 added the Bug This is a problem. label Aug 23, 2021
@crramirez
Copy link
Collaborator

Hello @doggy8088

Thanks for reporting. We'll take a look.

Regards,
Carlos

@crramirez
Copy link
Collaborator

Hello @doggy8088 ,

I tested with a fresh install of Pengwin and it doesn't happen. Also, I noticed the message that you showed in the screenshot and searched for it. Check this answer: https://stackoverflow.com/questions/57456894/visual-studio-code-waiting-for-second-key-of-chord-ctrl-a looks like you have Ctrl+L assigned to another action.

Regards,
Carlos

@crramirez
Copy link
Collaborator

I found this in settings:

image

@crramirez
Copy link
Collaborator

I also recommend putting this:

image

So, you'll have a login shell and all the pengwin default behavior.

@doggy8088
Copy link
Author

doggy8088 commented Aug 25, 2021

The Shell Args is deprecated.

image

I changed to this, but the Ctrl+L still unable use, but I can actually hit Ctrl+D to exit.

{
    "terminal.integrated.allowChords": true,
    "terminal.integrated.defaultProfile.linux": "bash",
    "terminal.integrated.profiles.linux": {
        "bash": {
            "path": "bash",
            "args": ["-l"],
            "icon": "terminal-bash"
        }
    }
}

I recorded a short clip. Please take a look.

https://youtu.be/tyRhDgoYWzg

@doggy8088
Copy link
Author

After setting "terminal.integrated.allowChords" from true to false, the problem solved.

{
    "terminal.integrated.allowChords": false
}

But I still don't know why Ubuntu 20.04 LTS don't have that issue. Only Pengwin Linux have this issue.

Here is the video clip about Ubuntu 20.04 can hit Ctrl+L clear screen.

https://youtu.be/7WEjzPgC8Ho

@doggy8088
Copy link
Author

Hello @doggy8088 ,

I tested with a fresh install of Pengwin and it doesn't happen. Also, I noticed the message that you showed in the screenshot and searched for it. Check this answer: https://stackoverflow.com/questions/57456894/visual-studio-code-waiting-for-second-key-of-chord-ctrl-a looks like you have Ctrl+L assigned to another action.

Regards,
Carlos

None of these hotkeys registered for Terminal.

image

@jdubwelch
Copy link

I just had a keybinding for ctrl+l that was attached to the terminalFocus (I can't remember what it was for now) I removed and it fixed it for me.

@lightecho037
Copy link

lightecho037 commented Aug 23, 2024

I had similar issue, and I solve it in the following steps
1 - I open the keyboard short cuts and I remove all the ctrl + l associated to that shutcut
image

2 - then in the searchbox I type terminal:clear and click on the + sign
image

3 - I submit the shortcut and I notice that vscode pop up window saying that other 3 command already existed
image

4 - and I remove all except the ones for the system
image

5 - that fix my issue, in my case copilot, bitbucket, on others were adding extra commands like extra ctrl+l g, p, c and others

6- this is how it ends, in my vscode
image

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

No branches or pull requests

4 participants