-
-
Notifications
You must be signed in to change notification settings - Fork 575
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 not working in Bash for Windows #629
Comments
Is it your question? http://stackoverflow.com/q/36467150/1405560 I'm not sure. Perhaps the switch |
Yes, that is the issue. When bash is launched through ConEmu, the arrow keys never work, not for command history or in Vim / Nano. Adding |
I also get this message when opening the console: I wonder if it's related? |
I have absolutely no idea yet, how "bash in Windows" was implemented. But last message looks like a luck of implementation. |
The arrow keys work running Windows 10 bash in a cmd window... and it would appear as though whatever is in between bash.exe and the actual executable is pretty substantial... within the bash shell, there's full-on apt-get (pointed at trusty repos), the windows %PATH% isn't on $PATH, and trying to run notepad.exe from inside bash.exe (...inside cmd.exe) reports that the binary has an unsupported format. Seems that windows 10 bash is leveraging some of the "new terminal features" that cmd.exe has options for, as it refuses to run if cmd.exe is set to legacy mode... the gist of those features is outlined (for windows server 2016) @ https://technet.microsoft.com/en-us/library/mt427362.aspx |
As far as I know, the It's not an actually Bash at all. Microsoft bash.exe only can be fed one option for now like I tried the RealConsole of ConEmu, arrow keys does work in the real console window. |
@lennylxx It is not just a wrapper, it IS bash. Try typing To resolve this issue, I have personally tried to change most of the keyboard configuration options inside Ubuntu itself to see if it is simply because Ubuntu itself doesn't know how to handle the inputs, but nothing seems to work. I'd assume the issue is that bash.exe expects a format of inputs that only the improved Windows Console Host in this Insider Preview can provide. Adding to that, it's not only the arrow keys that don't work, the del, end, home etc. keys don't work either. |
@Ordspilleren Yes, you're correct about the installer, I've double checked that. I'm surprised you found the But bash.exe IS a wrapper of The 'kernel' which is |
I'm also having this issue |
btw, all readline features also not working |
That all looks like a bash.exe bug. But I can't insist until I check it. |
I'm having this issue as well. Any left/right/up/down cursor key usage doesn't work, but does work in bash when running it via cmd.exe. Cursor keys in ConEmu before launching bash. |
And do not work Function keys (F1-F12) |
Thanks for your awesome work. Would just like to comment that I also am experiencing this and would love to see it fixed. Thanks again for conemu. It's awesome. |
It's a little frustrating reading the thread from the last time people had this issue, which was months ago. I have no idea why there's an insistence to place the blame on the programs having this issue. Bash On Windows has working arrow keys when I run it through:
Since this program is supposed to emulate the behavior of a Windows console, why is this behavior not clearly a problem with this program as opposed to the programs that are working correctly in the default console? Edit: Also works as expected on Console2 |
@ErrantErinaceinae Are you kidding? Months??? The issue was created four days ago! This is absolutely new feature of Windows 10! It's beta at last and may have bugs! |
referred to #183, which has comments that outline this exact issue but with another shell (the git-bash shell). The referenced issue in that thread fixed Docker but there was no further talk of the issue with git-bash. I don't think it's unreasonable to assume they're related. And again, I fail to see how expected behavior applying in all the contexts I mentioned but failing in this one program is a bug with the feature unless I'm misunderstanding something about the meaning of "Windows console emulator". And there's no need for the excessive punctuation and bolded excerpts, I can follow what you say just fine without them. |
As I said in that comment, the referenced issue in that thread fixed Docker but there was no further talk of the issue with git-bash, not Docker. The issue with git-bash that a series of comments in that thread mentioned mirrors the exact behavior I'm seeing now. |
…ws’. conhost does not do keypressed translation, if they were posted directly to console input. That's why switch `-cur_console:p1` must be used to turn on internal xterm emulation in ConEmu. So, the task {Bash-on-Ubuntu} would be: %windir%\system32\bash.exe -cur_console:p1
The only workaround: Build 160411 (or higher) and start bash as following:
|
I'm sorry, I tryed that and it still doesn't work for me :( |
@Maximus5 Thanks! It works! |
@Maximus5 Thank you very much for the workaround, it seems to work beautifully! The only issue that remains is the lack of support for international characters like æøå. This does not work in the official Bash on Ubuntu on Windows either, so I imagine it's up to Microsoft to fix that. |
Disability to type characters with codebase |
BTW, what do you think, what name should be given to the task? |
@Maximus5 I have personally just named mine |
Keys are working in WSL that's why this issue is closed. |
They do in shell but they don't in |
@chx Did you try to compare iex behavior with other terminals? Which? What ConEmu version do you use? How do you start the WSL? |
I have a shortcut to |
Here is a simplified bug report: if I start a plain |
YES! Switching off Appkeys helped. Nothing else. How do I get it to stay switched off across terminals, reboots and such? |
How can I do that AppKeys will be enabled by default? Turning on AppKeys helped me. |
Run default task for your shell |
In case this helps, in one of the newer versions of ConEmu, I wasn't getting the default AppKeys settings for a new custom task. I changed my custom task to include |
Thanks, that helped! I had to add "-l" param to the exec so that my login (zsh) shell will run |
In current builds in you use default tasks (with connector) AppKeys must be activated when console request them. Otherwise it may be a bug (of ConEmu or shell). |
The out of the box behaviour for ConEmu 180626 [64] and latest WSL with latest ubuntu didn't work for me. |
@yellow-sock The default ConEmu behavior is exposed by command
I doubt you have tried it |
@Maximus5 I didnt try it. I was assuming that it does the same as when I select Bash::bash from the menue. When I try it i get: The above picture was made with my current bash config (which is the one that works for me): Something wrong with my installation ? |
On your screenshot you run absolutely different task than you show on the second screenshot. |
Hey everyone, digit the number of the line and hit enter, works for me |
I just added the vim command :set term=builtin_ansi and then the arrows works. Therefore, I have added the command to my .vimrc file. |
See if |
Thank you Lucas! |
I faced the same problem while using eslint on git bash, I found this workaround useful - https://stackoverflow.com/a/58521883/11261701 |
I'm experiencing the non-working arrow keys issue with ConEmu 191912 (Preview) while running Cygwin BASH (using the default {Bash::CygWin bash} task on Windows 10 version 1909. |
me too |
Same here, arrow keys not working in Bash::CygWin. Adding p5 did not help. |
For those with recent comments on this closed issue. Problem is different - Issue with a change in cygwin. See #2035 |
|
The new Bash for Windows has just been released in the latest Windows 10 Insider Preview. I have added bash.exe in a new task in ConEmu, and it launches just fine. However, the arrow keys do not work in the bash environment (they work fine when launching bash.exe normally). I have tried revealing RealConsole by pressing Ctrl+Win+Alt+Space, and the arrow keys work just fine in that environment. My ConEmu configuration is the default one.
I am not sure what other information I can provide, feel free to request any additional info, I will do my best to provide such.
The text was updated successfully, but these errors were encountered: