Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Make forward-delete work in X11's tcsh line editor UNIX
There have been a couple of hints on how pressing Fn and Delete acts as the forward delete key on PowerBooks. One thing that was frustrating me was that in the default tcsh command line editor (in X11), a tilde is bound to that key. However, by including the following line in your .cshrc or whatever, you can get a correct forward-delete in your command line editor:
 bindkey "^[[3~" delete-char 
I found the code for that key combination by dumb luck on another server that it happened to work on. Does anyone know of the key codes for page up and page down? I'd like to be able to set them to backward-word and forward-word.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[4,005 views]  

Make forward-delete work in X11's tcsh line editor | 5 comments | Create New Account
Click here to return to the 'Make forward-delete work in X11's tcsh line editor' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Keycodes
Authored by: Hanji on Nov 28, '03 11:25:05AM

You can get the key code for anything by pressing Ctrl-V and then the key, which causes the key code to be echoed to the terminal.



[ Reply to This | # ]
Keycodes
Authored by: astack on Dec 06, '03 10:25:07PM

Cool, thanks!!! -Andrew



[ Reply to This | # ]
Make forward-delete work in bash line editor
Authored by: kholburn on Nov 28, '03 05:00:32PM

In Bash add this to your $HOME/.inputrc or /etc/inputrc

"\e[3~": delete-char

You can activate it in a current session by using this command:

bind '"\e[3~": delete-char'
or after you add the line to the file:
bind -f /etc/inputrc

These are my favourite bash bindings:
control-p: history-search-backward
control-n: history-search-forward



[ Reply to This | # ]
Terminal has editable bindings too!
Authored by: thinkyhead on Nov 28, '03 07:21:11PM

Open the <b>Window Settings...</b> in the latest version of Terminal and select the <b>Keyboard</b> section. There you can view and edit Terminal's keybindings and add your own. By default Shift-pageup and shift-pagedown are bound to [6~ and [5~ (ctrl-u and ctrl-v).

---
|
| slur was here
|



[ Reply to This | # ]
Terminal has editable bindings too!
Authored by: thinkyhead on Nov 28, '03 07:23:55PM

Ah, I guess the aforementioned escape codes aren't direct equivalents of ctrl-u and ctrl-v. Some programs (like joe and man) just happen to use these bindings.

---
|
| slur was here
|



[ Reply to This | # ]