Skip to content
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

Windows 10 WSL - arrow keys, Home and End not working #1832

Closed
reijin90 opened this issue Jul 5, 2018 · 7 comments
Closed

Windows 10 WSL - arrow keys, Home and End not working #1832

reijin90 opened this issue Jul 5, 2018 · 7 comments

Comments

@reijin90
Copy link

reijin90 commented Jul 5, 2018

In reference to issue number 1588, I open this one as the issue is not actually resolved. After patching conemu, copy and pasting works, but the arrow key behaviour is broken (command completion).

To cite myself:

Up and down [arrows] go through history, but before doing this [(updating conemu)], when I wrote "ssh" it would only cycle through my previous ssh commands. Pos1 and End still don't seem to do anything... It's odd...
I'm on Win 10 Pro 1803 17134.81

@reijin90 reijin90 changed the title Windows 10 WSL - arrow keys not working Windows 10 WSL - arrow keys, Home and End not working Jul 5, 2018
@deadalnix
Copy link

Ok so as it turns out, the p flag used to default to value 5 for cur_console, but doesn't anymore. This is what was causing the issue in vim and alike for me. Replacing p to p5 in my templates solved it.

@mthsy
Copy link

mthsy commented Jul 21, 2018

Thanks. It works for me.

@reijin90
Copy link
Author

reijin90 commented Jul 21, 2018

Perfect, this works!

For anyone wondering how to do it:
Goto Settings --> Startup --> Tasks
Now in all your "predefined tasks" that are used for WSL consoles, edit the command:
e.g. from %windir%\system32\bash.exe ~ -cur_console:p to %windir%\system32\bash.exe ~ -cur_console:p5 (note the p5 instead of p)

"Save Settings" and enjoy! :)

AltarBeastiful added a commit to AltarBeastiful/bash-zsh-on-windows-cmder that referenced this issue Oct 25, 2018
According to this issue cmderdev/cmder#1832
You need to add `p5` instead of `p` when creating the shell or some buttons won't work.
@isapir
Copy link

isapir commented Nov 22, 2019

The solution #1832 (comment) from @reijin90 works, but sometimes I start with a regular shell and only then call

bash

How can I get the cursor keys to work then?

@WayneD
Copy link

WayneD commented Jun 18, 2020

Yeah, vim is very broken in normal WSL. It even blocks the typing of capital-letter commands (e.g. ZZ) and ctrl keys. I work around the issue by starting up a screen session, since vim works fine inside screen. You may need to define SCREENDIR to get screen to run, though, since there's a bug with the auto-creation of the default /run/screen dir (or you can add rules to create it with mode 1777).

@asuiu
Copy link

asuiu commented Jun 24, 2020

I have the same issue and -new_console:p5 fixed it for me.

@taichushouwang
Copy link

My cmder is the newest version, 1035, I also have the same issue, but I can't find "%windir%\system32\bash.exe ~ -cur_console:p" such this string, How can i do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants