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

Terminal key combinations not working properly #7077

Closed
gerane opened this issue May 31, 2016 · 17 comments
Closed

Terminal key combinations not working properly #7077

gerane opened this issue May 31, 2016 · 17 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label

Comments

@gerane
Copy link

gerane commented May 31, 2016

  • VSCode Version: 1.2.0-insiders
  • OS Version: Windows 10

Steps to Reproduce:

  1. Open terminal using sysnative Powershell as default
  2. Press key combinations like the following and it inputs the key mapping instead:
    • ctrl + c produces ^C
    • ctrl + left produces 5D
    • ctrl + right produces 5C
  3. Using Shift combinations does not highlight text
    • shift + end Skips to end without highlight
    • shift + home Skips to beginning without highlight
    • shift + left moves left without highlight
    • shift + right moves right without highlight
@Tyriar
Copy link
Member

Tyriar commented Jun 1, 2016

So the regular Powershell terminal supports selection using those keybindings? Interesting that ctrl+arrow doesn't skip the word, that works fine on bash.

@Tyriar Tyriar added feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label windows VS Code on Windows issues labels Jun 1, 2016
@Tyriar Tyriar self-assigned this Jun 1, 2016
@gerane
Copy link
Author

gerane commented Jun 1, 2016

Yeah it works in regular powershell terminal, and it also works if you launch powershell from a cmd.exe prompt.

@gerane
Copy link
Author

gerane commented Jun 1, 2016

Here is an example of what it looks like inside of Code.

The only way to clear the line is to delete every character. There is also no way to copy text in the history or in the prompt. Pasting text is also very difficult.

@Tyriar
Copy link
Member

Tyriar commented Jun 1, 2016

These keys may be a limitation of winpty, or at least the quite old version that is being used.

Copying and pasting hasn't been looked at yet, the experience is terrible on all platforms. See #6451 #6945

@rajeev-kumar-sharma
Copy link

rajeev-kumar-sharma commented Jun 2, 2016

ctrl + c , here copy selected area (missing in vscode terminal), insted it produces ^C

it's my elementary os terminal with this feature
screenshot from 2016-06-02 13 00 46

ctrl + v, here paste whatever is in clipboard (missing in vscode terminal), insted it produces ^V

screenshot from 2016-06-02 13 01 06

also it warn me if copy some command from web and what ti paste here with ctrl + v

screenshot from 2016-06-02 13 13 02

@elirnm
Copy link

elirnm commented Jun 9, 2016

ctrl + backspace in powershell is also not working. It only removes one character, while in native powershell and powershell launched through native cmd it removes the whole previous word.

Edit: Nevermind, it appears that ctrl + backspace doesn't delete the whole word on 32 bit powershell, which is what I was running in VSCode.

@elirnm
Copy link

elirnm commented Jun 9, 2016

In the latest insider's release ctrl + left/right no longer produce '5D/5C', but only move one character at a time rather than whole words. ctrl + c produces nothing rather than '^c'.

@Tyriar
Copy link
Member

Tyriar commented Jun 10, 2016

Thanks @AAurelianus, it looks like the adoption of xterm.js has improved the powershell situation 🎆

Here is the open issue for ctrl+arrow xtermjs/xterm.js#65 (it happens on Linux/bash too).

@Tyriar Tyriar added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jun 10, 2016
@elirnm
Copy link

elirnm commented Jun 11, 2016

@Tyriar actually my previous comment on ctrl + backspace does apply. In native powershell the sequence deletes whole words, in powershell in the integrated terminal it only deletes single characters, the same as unmodified backspace. This is both on 1.2.0 and the 2016-6-10 Insider release.

@michaeltlombardi
Copy link

@gerane, I think the functionality for those keys is driven by PSReadline, not the terminal itself.

The terminal does seem to load PSReadline okay (the color highlighting works, no errors get thrown) but some of the functionality is lost. This might be due to the implementation of PSReadline?

@codymullins
Copy link

is this already being worked on or is it something I could create a PR for?

@Tyriar
Copy link
Member

Tyriar commented Jun 27, 2016

@codymullins not being worked on right now, I'm guessing its a problem within the https://github.com/sourcelair/xterm.js code base though (or the oldish https://github.com/rprichard/winpty version it uses when hooked up with pty.js).

@Thaina
Copy link

Thaina commented Aug 2, 2016

Using vscode with windows native command line also the same problem with ctrl key

@Tyriar
Copy link
Member

Tyriar commented Aug 2, 2016

@Thaina ctrl+left/right in cmd.exe should work fine in the current insiders https://code.visualstudio.com/insiders

@idoo
Copy link

idoo commented Sep 29, 2016

Is it possible to build CMD+K to clear current render in terminal?

@Tyriar
Copy link
Member

Tyriar commented Sep 29, 2016

@idoo a command to clear its being added in v1.6,the key binding will come a little later though #12585

@Tyriar
Copy link
Member

Tyriar commented Apr 20, 2017

Closing this off in favor of #11314 (blocking upstream issue: xtermjs/xterm.js#487)

@Tyriar Tyriar closed this as completed Apr 20, 2017
@Tyriar Tyriar added *duplicate Issue identified as a duplicate of another issue(s) and removed feature-request Request for new features or functionality upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues labels Apr 20, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

8 participants