View Single Post
  #2   (View Single Post)  
Old 11th December 2008
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

In my ~/.Xresources file I have mapped the Delete keys to a string:

Code:
*VT100.Translations: #override \
              !<Key>BackSpace:    string(0x7F) \n\
              !<Key>KP_Begin:     string(0x1b) string("[25~") \n\
              !<Key>Home:         string(0x1b) string("[7~") \n\
              !<Key>KP_Home:      string(0x1b) string("[7~") \n\
              <Key>Insert:        string(0x1b) string("[2~") \n\
              !<Key>KP_Insert:    string(0x1b) string("[2~") \n\
              <Key>Delete:        string(0x1b) string("[3~") \n\
              !<Key>KP_Delete:    string(0x1b) string("[3~") \n\
...(etc.)...
Note the last two lines especially. Then, in my ~/.inputrc I use that string:

Code:
"\e[3~": delete-char        # Delete
I hope that can get you started on what you want to do. (BTW, thanks for the tip about Ctrl-V, didn't know about that.)
Reply With Quote