-
Notifications
You must be signed in to change notification settings - Fork 29.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
Arrow keys don't work in Ubuntu Bash on Windows #10163
Comments
I am also having the same issue. It does not work on version 1.4 neither. |
It is related to microsoft/WSL#111 |
@vrabcak thanks a bunch for pointing this issue out! |
For those using bash for windows in vscode and cannot wait to use the history, here are some usefull commands involving the bang character when arrow keys are not available: http://ss64.com/bash/bang.html |
I can't believe that this one is still not working. I submitted this back and August. How long does it take to support a simple history buffer? The native shell (Win10 bash) works, why not vsc? |
@u84six as mentioned above, this is an upstream issue microsoft/WSL#111 |
Not 100% sure but the fix may just be to have xterm.js set application mode? |
More info here: Build 6041 Edit: I cannot add the arguments to the |
|
|
@Tyriar |
@Tyriar sorry for misleading, I did not really know what the arg was for just grabbing around. @Maximus5 do you think it will be possible for us to recreate what you did to work around this issue using the method you used, also if you have any other info that you think might help the efforts please share. :). From what I understood you have two workarounds, the initial one and the later one. I am finding it hard to see what you did for the later one, if it is possible can you please point to a commit or something ;). Thanks for the great work on ConEmu btw, it is a dream to use! |
ConEmu provides the one workaround: automatic translation of native keypresses into Xterm compatible keypresses. In later (current) ConEmu versions this translation is turned on automatically when flag 0x200 is turned on for input console handle. Actually, this is due to a bug (AFAIK the internal MS bug is filled for conhost). Unfortunately, arrow keypresses may be encoded in two ways, and without wslbridge it's absolutely impossible to handle them automatically. |
@Maximus5 thanks for the clarification 😃 |
@Tyriar @longtomjr and update on this? Anything I can do to help? @Maximus5 where can I learn more about this native to Xterm translation process? Thanks |
I'm in the process of an uplevel to winpty@0.4.0 which should fix the issue, see https://github.com/Tyriar/pty.js/issues/10 |
The same problem here when working with docker container's bash session: |
There is a simple workaround for using the history: Use the bash commands which use the Ctrl key! Yes, bash has those, but most people forgot their existence, it seems. Ctrl+P: Previous command (like up arrow) For details, see http://www.gnu.org/software/bash/manual/html_node/Bindable-Readline-Commands.html#Bindable-Readline-Commands There is just one small issue: Ctrl+P (arguably one of the most important commands) is usually executed by VSCode to show "Quick Open". There are three ways to solve this: You could reassign the "previous-history" command in bash, reassign the "workbench.action.quickOpen" command in VSCode, or - arguably the easiest solution - change your "terminal.integrated.commandsToSkipShell" setting in VSCode to exclude "workbench.action.quickOpen" (you would then have to move focus away from the terminal to have VSCode respond to Ctrl+P). |
I tried wslbridge to use arrow keys on terminal, and I successed.
NOTICE: you can NOT use an environment variable (i.e. %USERNAME%) in User Settings, you have to replace to your username. |
@horihiro good to know you got this working that way as a temporary work around 👍 |
Does closing this mean that it's fixed? What do I have to update to fix this problem because it's still not working. |
Fantastic news, your efforts here are greatly appreciated! I've been using Ubuntu in a Windows shop, (and dealing with some pretty poor graphics drivers because of it) it'll be nice to remove that bit of friction when this lands by switching to Windows 10. |
Good to hear that it's fixed in the insiders build. Perhaps I can encourage some Apple fanboys to develop on windows not we have all the Unix CLI tools built in. |
when type 'blank' or 'tab' ,there is a wrong blank space,use 'cat sth.txt',repeat this bug |
Steps to Reproduce:
This works in the new stand-alone bash terminal. This also works on a mac. Just not vsc.
The text was updated successfully, but these errors were encountered: