Keyboard shortcuts for copy / paste into console
It would be nice to have keyboard shortcut for pasting into console instead of right clicking (Or window menu -> edit -> paste).
I tend to use my keyboard as much as possible. So it would be nice to have a shortcut like git bash:
- copy = ctrl + insert
- paste = shift + insert
Agreed, this feedback is more general Windows cmd.exe than bash-specific. Here's a workaround to make copying and pasting easier for you:
Launch cmd.exe
Right click title bar, click Properties
Options Tab
Enable QuickEdit mode
Now you can highlight text with your mouse cursor, right click to copy, right click again to paste.
Agreed, this feedback is more general Windows cmd.exe than bash-specific
That's not entirely true, by default the new cmd.exe accepts text pasted with CTRL + V, it's only once you're in bash mode you can't paste anything with CTRL + V (not even CTRL + Shift + V like in Ubuntu terminal).
That's just an option in the properties (Enable shortcuts with Ctrl or something like that, my interface is not in English :) )
I think using the Ubuntu Style Ctrl-Shift-C would make sense, especially as Ctrl-C is a common interrupt
I'd also like to see things like emacs mode honoured where Ctrl-A / Ctrl-K work as expected
AFAIK Ctrl+A and Ctrl+K already works as expected.
@mobluse So they do. They didn't work for me the other day though, odd.
I think using the Ubuntu Style Ctrl-Shift-C would make sense, especially as Ctrl-C is a common interrupt
My toughs where the same with the Ctrl-C (and also Ctrl-V, not that common) interrupt signals.
That is why I suggested Ctrl + insert and Shift + insert. They work in windows now, so it is nothing new. And they are compatible with the Linux keyboard interrupts.
I vote for Ubuntu terminal shortcuts Ctrl + Shift + C/X/V as a primary ones and maybe an alternative Ctrl/Shift + Insert. But that's only my preference because I use bash on Linux in most cases.
Why not to provide a way to configure the terminal shortcuts for this app? I'm not a win user, i'm just reviewing it
If not, @mirao proposal +1. I'm a *nix user in most cases too, and would be great maintain the default terminal shortcuts for the major distros.
I would like to have CTRL + Shift + C/X/V, although if possible my vote would be for it to be configurable.
This is a current limitation in the Windows Console.
Console currently supports two input modes: 'processed' and 'raw'. In 'processed' mode, Windows Console pre-processes all keystrokes, handling several well-known chords consistently across cmd, PowerShell and elsewhere.
To better handle *NIX behavior, however Bash requests raw, un-pre-processed keyboard input. We do have a task on our backlog to add a "mildly-pre-processed" mode wherein Console will translate copy and paste key chords into the VT sequences expected by *NIX tools, shells, etc.
You can run REG.EXE add HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f as administrator in the Windows Command Prompt to enable QuickEdit by default.
This would let you:
- copy text by highlighting text (left clicking) and then right clicking.
- paste text by right clicking
To disable QuickEdit run REG.EXE add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f as administrator in the Windows Command Prompt to disable it by default.
I just installed "Bash on Windows" and I can copy / paste by doing
- CTRL + SHIFT + C
- Right Click
ctrl+shift+c ctrl+shift+v is what is preferred
Here's another vote for Ctrl+Ins/Shift+Ins. This seems to be the standard for TTY apps, which is how I usually interact with Linux when in Windows.
+1 to Ctrl-V or some variant. Right clicking to paste works, but taking my hands off the keyboard is far from ideal.
I agree that this should be configurable.. I, for one, would like to have either CTRL+SHIFT+C/X/Vor ALT+C/X/V (to simulate how things are done in Mac; the Command + C/X/V)... Also, it would be preferable to configure the "right click" behaviour as I'd expect it to give me a menu (to copy/cut/paste.. etc) as opposed to the "right click to paste" behaviour.. This is especially noticeable when using VIM.. ☹️
Suggest seeing these uservoice requests in addition to upvoting here:
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13341399-bash-copy-paste
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13373574-bring-ctrl-shift-c-v-to-copy-and-paste
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13389489-better-hotkey-shortcut-integration
Another vote for gnome-terminal style cut and paste.
The main problem is that it is using the Windows Console app, which, at least from a linux guy, sucks, and always has.
If you really want to cater to linux folks, you need a much better terminal emulator.
mouse right click is not better than ctrl+shift+c\v.hope ASAP to support this function.
There is a workaround to the WSL Bash, paste issue:
One can simply do the following steps:
- open cmd.exe
- bash -c "pasted command here" ( this works because you are in cmd.exe )
The bash will exit after the command, I don't know how, yet, to keep it running after, like, "variable assign" from the cmd console. e.g. 'bash -ic "command and remain'