Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.62k stars 575 forks source link

Linux for Windows bash doesn't react to arrow keys when launched via start menu #811

Open samdark opened 8 years ago

samdark commented 8 years ago

Versions

ConEmu build: 160724 x64 OS version: Windows 10 1607 x64 Used shell version: Linux for Windows bash

Problem description

Linux for Windows bash doesn't react to arrow keys.

Steps to reproduce

  1. Install Linux for Windows bash.
  2. Turn on "Force ConEmu as default terminal for console applications" in ConEmu.
  3. Launch "Bash on Ubuntu on Windows" via start menu.
  4. nano .bashrc
  5. Press ↓

    Actual results

Cursor doesn't move down.

Expected results

Cursor moves down.

elangelo commented 8 years ago

The arrows work nowhere. Not just nano. Just try getting your previous command with the arrow up on the prompt, won't work as well.

samdark commented 8 years ago

Updated description.

elangelo commented 8 years ago

https://github.com/Maximus5/ConEmu/issues/629 https://conemu.github.io/en/BashOnWindows.html

(should search before posting i guess :p )

/edit: not that it's working for me though :(

/edit2: version of conemu was way too old that's why there is actually a ticket logged at mickeysoft by maximus: https://github.com/Microsoft/BashOnWindows/issues/111 tells you which version you're supposed to run

Maximus5 commented 8 years ago

Actually I wonder what are you doing, folks? Arrow keys workaround was implemented few months ago in ConEmu. The bug of WSL (arrow processing) was documented, posted and accepted by MSFT (issue link is above).

I do not see any problems with arrows on my test Windows 10.

samdark commented 8 years ago

Umm... nothing in particular.

  1. Install WSL via official anniversary update.
  2. ConEmu was latest available version (160724), "Force ConEmu as default terminal for console applications" turned on.
  3. Run "Bash on Ubuntu on Windows" via start menu.
  4. ConEmu catches console.
  5. Type nano .bashrc.
  6. Try arrow keys — doesn't work.
  7. Go to ConEmu, turn off "Force ConEmu as default terminal for console applications".
  8. Run "Bash on Ubuntu on Windows" via start menu.
  9. It opens a separate window.
  10. Type nano .bashrc.
  11. Try arrow keys — works.
samdark commented 8 years ago

Was the workaround included in 160724 version of ConEmu? Do we need to change anything in settings in order for it to be applied?

tanguyvda commented 8 years ago

Same issue here, also in v160724. Should we downgrade our conemu version ?

elangelo commented 8 years ago

I doubt this is going to work if you don't start Bash For Windows from within ConEMU

tanguyvda commented 8 years ago

Nevermind, looks like I had a wrong information coming from the cmder interface :/ Going to try vim workaround now

samdark commented 8 years ago

OK. I've found what's wrong and how to reproduce it.

Indeed, as @elangelo mentioned, it's fine if I start bash from within Conemu so the issue is w/ "Force ConEmu as default terminal for console applications" and launching "Bash on Ubuntu on Windows" via start menu.

samdark commented 8 years ago

Updated description.

samdark commented 8 years ago

@Maximus5 should be reproducible easily.

Maximus5 commented 8 years ago

Actually "particular". Try this:     ConEmu.exe -basic -run {bash}

samdark commented 8 years ago

ConEmu60.exe -basic -run bash works well w/o issues. It's only "Force ConEmu as default terminal for console applications" and a launch via start menu which doesn't work.

paulodeleo commented 8 years ago

I've just applied the "windows 10 anniversary update" (build 10.0.14393 shown for ver command), the one that brings "bash on windows" (but I have not installed it) and the arrow keys stopped to work in bash through docker run ... / docker exec ....

I know that this issue is not about docker, but the problem seems related. I've found a lot of other (closed) issues related to arrow keys but no workaround fixed it for me. Would love to test any new workarounds or help in some way.

samdark commented 8 years ago

@paulodeleo try turning off "Force ConEmu as default terminal for console applications" in ConEmu settings and do what you did previously in a newly launched (via "Bash on Ubuntu on Windows", start menu) window. If it works well then it's ConEmu issue. If not — that's something different.

paulodeleo commented 8 years ago

@samdark "Force ConEmu as default terminal for console applications" option is turned of and was never turned on.

Testing with docker like suggested here by @Maximus5 confirms that the arrow keys do not work. But they do work with the same test when using cmd or RealConsole from cmder.

samdark commented 8 years ago

@paulodeleo then they don't work at all, no matter which terminal is used. Definitely not ConEmu issue...

Maximus5 commented 8 years ago

Don't mix WSL and other subsystems issues. Docker is not a WSL application!

Maximus5 commented 8 years ago

@paulodeleo

But they do work with the same test when using cmd or RealConsole from cmder.

Really? Cmder is ConEmu. So your problem is not a ConEmu problem, but rather the way you start the docker or your docker configuration!

paulodeleo commented 8 years ago

@Maximus5, sorry, I know that Cmder is ConEmu. I don't think I made myself clear:

  1. The arrow keys work with docker only when using cmd or in RealConsole window of Cmder (I also understand they are the same);
  2. The arrow keys do not work with docker anymore, only if using Cmder / ConEmu;
  3. This started after the anniversary update. Arrow keys were working fine with docker and ConEmu 2 hours ago, before the update.
  4. I am not using WSL at all. I'm just suggesting that the Windows update that brings WSL can break arrow keys in some apps, only when ConEmu is involved. The fix should be provided by ConEmu? I don't know.

I understand that all this I am saying here can be seen as off-topic. Can you please, point me to the right direction If this can be better discussed opening other issue, on this project or docker project (as it looks like docker has some ConEmu specific patches)?

jasekiw commented 8 years ago

I just started using the windows bash and arrow keys, or any input in an application like nano, htop, or man do not work. I've been forced to revert back to window's cmd. If I go to debug->real console and type then the input is accepted. I do not have the "Force ConEmu as default terminal for console applications" options on.

Papyruse commented 8 years ago

same here but that trick seems to work "%WINDIR%\System32\bash.exe ~" -new_console:p