This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Delete key... was home directory.


,--- * Keyboard-and-Console-HOWTO.html#s5
| People often complain 'my backspace key does not work', as if this key
| had  a  built-in  function 'delete previous character'. Unfortunately,
| all  this  key, or any key, does is producing a code, and one only can
| hope  that  the  kernel tty driver and all application programs can be
| configured  such  that  the  backspace  key  indeed does function as a
| 'delete previous character' key.
`---

* Chris W (2004-06-17 06:11 +0100)
> Thorsten Kampe wrote:
>>* Chris W (2004-06-16 22:13 +0100)
>>>Now if I could just figure out why, when I hit the [Delete] key in
>>>bash,  I get a '~' character instead of deleting the character the
>>>cursor is  at, I would be set.  At least as far as cygwin goes
>>>anyway.
>>
>>Just read the beginning of /etc/profile again. There you get answer
>>and also to your "bashrc" question.
> 
> I assume you are refering to the referenc to this web page
> http://www.ibb.net/~anne/keyboard.html
> 
> Am I the only one that thinks reading a 12 page document, and possibly 
> editing 5 different config files is a hell of a lot of work just to get 
> the delete key to work?!?!?!

You want to make the "delete key" delete in bash? The chapter about
bash isn't even one page long. Browsing the document would help you to
understand why solving your problem in bash won't solve it in all
other application (zsh, vim, mutt, X).

Refusing to read and learn isn't going to get you anywhere -
especially in a Unix/Cygwin environment. But if you want it the easy
way:

##                                                                                     
# insert key pastes from the clipboard                                                 
"\e[2~":    paste-from-clipboard                                                       
"\e[3~":    delete-char                                                                
"\e[A":     history-search-backward                                                    
"\e[B":     history-search-forward                                                     
                                                                                       
# these are the same as below (captured with [Ctrl][V])                                
#"\C-[Oc":  forward-word                                                               
#"\C-[Od":  backward-word                                                              
#"\C-[[7~": beginning-of-line                                                          
#"\C-[[8~": end-of-line                                                                
                                                                                       
# xterm/rxvt ("od -c")                                                                 
"\eOc":     forward-word                                                               
"\eOd":     backward-word                                                              
"\e[7~":    beginning-of-line                                                          
"\e[8~":    end-of-line                                                                
                                                                                       
# Cygwin and Linux Console return the same keycode for [Ctrl][Key],                    
# shifted and unshifted                                                                
"\e[1~":    beginning-of-line                                                          
"\e[4~":    end-of-line                                                                
                                                                                       
# M-i indents, M-o unindents                                                           
$if Python                                                                             
    "\M-i": "    "                                                                     
    "\M-o": "\d\d\d\d"                                                                 
$endif                                                                                 
##                          


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]