-
Notifications
You must be signed in to change notification settings - Fork 184
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
How to make CTRL-V paste on windows (cmd.exe, powershell) #519
Comments
I only have access to a Windows machine at work.
|
I only have access to a Windows machine after work, so I'll try the others out later.
Is that because rustyline is intercepting the keybinds in some bad way, or is it because the expectation in powershell/cmd.exe is that applications process CTRL-V directly? Similarly, do you know if it's possible to add "copy/paste clipboard" commands?
I'd like to make this work by default. My customers (people using the software I'm writing using rustyline) should not have to do this setup (and they won't). |
We will need to implement this method and bind it to Ctrl-V on Windows here. |
Well, that's pretty clear! Thanks. I know literally nothing about the windows API. If you can point me at some method names, I can try implement it. |
https://github.com/marcbowes/rustyline/commit/b0e2669acacf9c259f0f73bc1d9d8f271f8a07c2 I'll test that out later on my Windows machine. If it works, I'll wire up a paste command. |
See the above PR for a fix. Not sure if I did it right. Also had to revert the fd-lock change to get things compiling. |
Version 8.1.0 released |
Thank you! |
Fixed via kkawakam/rustyline#519 With this upgrade, ctrl-c + ctrl-v should now copy-paste as expected. Previously, this would only work on Windows Terminal: Powershell or cmd.exe would ignore the ctrl-v but rightclick would paste.
When using rustyline on Linux or OSX, system copy-paste works just fine. However, on Windows that's not the case.
Here's a scenario that doesn't work as expected:
The same thing is true when using Powershell. When using Windows Terminal, CTRL-V works as expected.
I looked through the available keybinds/commands and I don't see a "paste from system clipboard" anywhere. Should this work by default, or is there something I need to enable?
The text was updated successfully, but these errors were encountered: