Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use home, end, delete, pageup, pagedown with ksh. My TERM is xterm-color. These keys works fine with tcsh and zsh, but not with ksh (print a tilda ~)

I found this:

bind '^[[3'=prefix-2
bind '^[[3~'=delete-char-forward
bind '^[[1'=prefix-2
bind '^[[1~'=beginning-of-line
bind '^[[4'=prefix-2
bind '^[[4~'=end-of-line

But when I set one bindkey, the last does not work anymore.

How can I use these keys in ksh with a .kshrc ?


share|improve this question
Cross posted:… – Dennis Williamson Oct 13 '09 at 0:25

set -o emacs

should work.

share|improve this answer

I made a file with this and others resources(like keys, functions, colors and a .bash_logout similar in ksh named .ksh_logout.

Check my dotfiles repository in github:

The content of file .ksh_keys.

# by TeeBSD (@antonio_cfc)
# Activate Delete
bind '^[[3~'=delete-char-forward

# Activate Home
bind '^[[1~'=beginning-of-line

# Activate End
bind '^[[4~'=end-of-line
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.