# CTRL+Arrow keys don't work with Git Bash for Windows?

2 messages from 2015-01-29 to 2015-02-12. Participants: Kevin, Sebastian Schuberth.
Thread: https://gitlist.dev/t/38469

## Kevin, 2015-01-29 15:18

Subject: CTRL+Arrow keys don't work with Git Bash for Windows?
Message-ID: <loom.20150129T161729-820@post.gmane.org>
URL: https://gitlist.dev/e/loom.20150129T161729-820%40post.gmane.org

```
Hello,
I'm trying to set up some navigation shortcuts I have become accustomed to
using in Windows environments, as well as KDE Konsole.  I would like to bind
CTRL+Left to "backward-word" and CTRL+Right to "forward-word" (there are
more, but this is a start).  I can enable this behavior by adding something
like "\e[D": forward-word to my ./inputrc file, but this also overwrites the
"forward-char" sequence that comes from a "Right Arrow" press without the
CTRL key.  For some reason, when I use the Git Bash shell the key sequence
for "CTRL+Right" and "Right" (\e[C) are the same -- same with "CTRL+Left"
and "Left" (\e[D).

Most of the solutions I have come across only address adding things to the
".inputrc" file, but in this case that is not the problem.  The problem is
that the CTRL+Arrow keys are not sending any unique sequences.  These
sequences are distinct and can be bound as I am describing when using the
"mintty.exe" xterm terminal emulator.  So why are they not working when I
start up Git Bash (which I believe has no emulator, it just uses windows
cmd.exe?).  I also see this problem when I use the "bash.exe --login -l"
that was installed with MinGW/MSys.

Thanks for any suggestions on how to enable this behavior.

Kevin

```

## Sebastian Schuberth, 2015-02-12 08:27

Subject: Re: CTRL+Arrow keys don't work with Git Bash for Windows?
Message-ID: <loom.20150212T092018-468@post.gmane.org>
URL: https://gitlist.dev/e/loom.20150212T092018-468%40post.gmane.org
In-Reply-To: <loom.20150129T161729-820@post.gmane.org>

```
Kevin <kevin071586 <at> yahoo.com> writes:

> that the CTRL+Arrow keys are not sending any unique sequences.  These
> sequences are distinct and can be bound as I am describing when using the
> "mintty.exe" xterm terminal emulator.  So why are they not working when I

Note that mintty does not work properly with (interactive) native Windows
applications (i.e. applications that do not link against msys-1.0.dll or
cygwin1.dll) like git.exe from Git for Windows, see [1].

> start up Git Bash (which I believe has no emulator, it just uses windows
> cmd.exe?).  I also see this problem when I use the "bash.exe --login -l"
> that was installed with MinGW/MSys.

There you have you answer: Git for Windows runs bash.exe (not cmd.exe) from
the MinGW/MSys package. So if you have this issue in vanilla MinGW/MSys,
you'll have it in Git for Windows, too. That said, it probably makes sense
for you to discuss this on the MinGW/MSys mailing list, or even file a bug
with them.

[1] https://code.google.com/p/mintty/issues/detail?id=56

Regards,
Sebastian

```
