jcjordyn140 / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

home and end keys do not work #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. start mintty -
2. type some command at the bash prompt
3. press Home

(a trivial variation of the above reproduces the problem
with the End key).

What is the expected output? What do you see instead?

I would expect the cursor to be placed at the beginning of the line 
(or the end of the line for End).

Instead, the cursor is not moved, a tilde is added to the command line
and the PC produces a discontented beep.

What version of the product are you using? On what operating system?

$ mintty -v; uname -s -r -m -o
MinTTY 0.3.5
Copyright (C) 2008-09 Andy Koppe
CYGWIN_NT-5.1 1.5.25(0.156/4/2) i686 Cygwin

(that is: Windows XP pro SP2)

Please provide any additional information below.

Well, thank you very much for this great software!

Original issue reported on code.google.com by servaasg on 3 Mar 2009 at 10:50

GoogleCodeExporter commented 9 years ago
This is a shortcoming in bash's default configuration. To get those keys 
working, add
the following two lines to the readline configuration file ~/.inputrc:

"\e[1~": beginning-of-line
"\e[4~": end-of-line

Alternatively, bash's builtin 'bind' command can be used to change key bindings.

Original comment by andy.koppe on 3 Mar 2009 at 2:20

GoogleCodeExporter commented 9 years ago
This works. Thanks!

Original comment by servaasg on 3 Mar 2009 at 3:46

GoogleCodeExporter commented 9 years ago
Here are a few more inputrc settings you might find useful:

# ctrl-left/right
"\e[1;5D": backward-word
"\e[1;5C": forward-word

# ctrl-up/down
"\e[1;5A": history-search-backward
"\e[1;5B": history-search-forward

# ctrl-backspace/delete
"\C-_": backward-kill-word
"\e[3;5~": kill-word

# alt-backspace
"\e\d": undo

Original comment by andy.koppe on 3 Mar 2009 at 5:24

GoogleCodeExporter commented 9 years ago
I had already found ctrl-left/right, but this makes my list complete. Especially
history-search-* is a great find.

Original comment by servaasg on 4 Mar 2009 at 1:24

GoogleCodeExporter commented 9 years ago
Actually this is a MinTTY problem after all: it's not compatible with xterm's 
default
config, which sends "PC-style" ^[[H and ^[[F and not VT220-style ^[[1~ and 
^[[4~. Sorry.

Fixed in r180 on 0.3 branch.

Original comment by andy.koppe on 15 Mar 2009 at 6:44

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 16 Mar 2009 at 12:31