Using WSL on Windows 10 14393.576, ConEmu 161206.
Pressing Home in Emacs gives status: "M-[ h is undefined". For End it's "M-[ f is undefined". Ctrl+Space just inserts space. I tried mapping those to 'beginning-of-line, 'move-beginning-of-line, etc as per solution suggested here, now Home and End work, but for some reason it results in mark being set, so it selects all text to beginning/end of the line.
Home and End do work on the command line.
I actually have this problem. Especially with any process that requires a combination of Ctrl + something else. I was wondering if there is any way to generally bypass key interception wholly for WSL similat to that of mintty and just limit to changing focus between conemu and wsl-bash?
ps. thank you for the wonderful software. it has really changed my windows workflow
@hsab I tried several workarounds, none worked satisfactorily except the following:
1) download and install wsltty, a special mintty build https://github.com/mintty/wsltty
2) setup the "wsltty" task as follows: %LOCALAPPDATA%\wsltty\bin\mintty.exe --wsl -o Locale=C -o Charset=UTF-8 /bin/wslbridge -t /bin/bash -l
3) enable the "Install keyboard hooks" option in Settings -> Keys & Macro -> Keyboard
4) change the keyboard shortcuts for "Switch next console" and "Switch previous console" to Win+PgUp and Win+PgDown (or Win+other keys that you prefer).
Basically, this embeds mintty into ConEmu. The disadvantage is that you cannot use the tab switching shortcut that you're used to, but are forced to use Win+PgUp/Down and similarly with other ConEmu shortcuts (which I don't use). But it's okay-ish for me as a temporary solution until Windows fixes their console.
I tried several workarounds
Which exactly?
Which exactly?
I don't remember all the details, but here's what I tried for sure:
So, you haven't even read ConEmu docs?
Yes I have. Tried to follow it, something didn't work. And then I found cmder, which I assumed did the same, but without the need to tinker manually, so I tried that instead.
Edit:
Specifically, here is the screenshot of the error. https://snag.gy/wbEjs2.jpg
Command used: conemu-cyg-32.exe ./wslbridge.exe -t "-new_console:D:H:\devel\MinGW\cygwin-connector" -new_console:np
@kirillkh thank you kirill. this solution worked nicely.
I cant get my enter key to work in conemu with emacs. it works in vi. I've used WSL bridge, msys2 and cygwin connectors, spent hours and hours trying to fix it :(
I fix one problem and another one shows up
well "zile", not emacs technically
everything works fine if I use mintty.exe directly
Is there a way to fix ctrl-space without using mintty? It works in conhost now (RS2), but not in conemu.
Ditto, ctrl-space now works in plain bash.exe, but not in conemu.
By the way, I figured out the reason I was getting the error when running conemu-cyg-32.exe ./wslbridge.exe -t "-new_console:D:H:\devel\MinGW\cygwin-connector" -new_console:np: the "-new_console:D" part is actually wrong, it needs to be the lower-case "d" as per ConEmu's docs. Please fix this command line here: http://conemu.github.io/en/BashOnWindows.html
Now I am able to run that command successfully, however, Ctrl-space doesn't work. Using ConEmu 161206.
I have installed the latest alpha version which contains the commit above, but it still doesn't work. Am I missing something?
What exactly doesn't work? What do you press and what do you expect?
When I press Ctrl+space, it inserts spaces. Midnight commander has this shortcut which calculates folder sizes. It works in both putty and windows bash client.
I can do specific tests if you need me to.
Do you use cygwin/msys connector?
No, I use it as it came from the download page. Should I be?
What does it do?
The default bash console does not have the same problem with Ctrl+Space, so the problem does not seem to be on the Ubuntu side.
The page https://conemu.github.io/en/BashOnWindows.html contains all information you interested in.
I read it, but I don't understand it. Do I need it for Ctrl+Space to work?
As I said above. You need connector+wslbridge to give ConEmu ability to bypass Microsoft's conhost bugs.
Just tried it, downloaded wsl-con.cmd, let it downlad (being Administrator), then ran it as a normal user. it showed some color cubes and displayed a command prompt. When I ran MC from there, I had the same problem. I may be doing something wrong...
Furthermore, mouse events are not sent to MC too. Maybe there is a setting for this?
What is the version of the connector you are trying?
New version is bundled with ConEmu. wsl-con.cmd may download old one.
So, I replaced conemu-cyg-XX.exe with the files in ConEmu folder. The x64 version doesn't start at all (The application was unable to start correctly (0xc000007b)). The x86 starts okay. Also:
Anything else I need to check?
Version of the connector of course. It's the only significant thing.
Ok, how do I get this version if it is downloaded by bat file? It is the wsl-bridge.exe, right? I could just try overwrite the two files (wslbridge-backend and wslbridge.exe) from the 0.2.2 version (as I have Ubuntu 16)
As I said above:
New version is bundled with ConEmu.
Did you downloaded Pack or Installer? Doesn't matter. Proper and latest connector's binaries are located in the folder with ConEmuC.exe.
Of course, connector requires proper cygwin1.dll, msys-2.0.dll, etc.
wslbridge.exe and wslbridge-backend are required too, and they requires proper cygwin1.dll, msys-2.0.dll, etc.
Batch file wsl-con.cmd is obsolete, if was created earlier to demonstrate the ability.
Okay, here is what I did:
It still does not work. Ctrl+Space just types spaces. When I tried running Mintty (presumably using the same files), it does not have the same problem with Ctrl+Space.
"C:\Program Files\ConEmu\conemu-cyg-64.exe" --version print?I see now. You need version 1.1. But it was but released as binary. Sources only yet.
Oh. Where should I check for binary when it is released?
Or you need to build it?
In the ConEmu distribution.
Next alpha build.
Perfect! Will that solve the mouse events in MC also?
Most helpful comment
@hsab I tried several workarounds, none worked satisfactorily except the following:
1) download and install wsltty, a special mintty build https://github.com/mintty/wsltty
2) setup the "wsltty" task as follows:
%LOCALAPPDATA%\wsltty\bin\mintty.exe --wsl -o Locale=C -o Charset=UTF-8 /bin/wslbridge -t /bin/bash -l3) enable the "Install keyboard hooks" option in Settings -> Keys & Macro -> Keyboard
4) change the keyboard shortcuts for "Switch next console" and "Switch previous console" to Win+PgUp and Win+PgDown (or Win+other keys that you prefer).
Basically, this embeds mintty into ConEmu. The disadvantage is that you cannot use the tab switching shortcut that you're used to, but are forced to use Win+PgUp/Down and similarly with other ConEmu shortcuts (which I don't use). But it's okay-ish for me as a temporary solution until Windows fixes their console.