# home, end, pgup, pgdown with ksh



## clinty (Oct 13, 2009)

Hello.

A user use ksh. I try to find a solution for these keys (Home, End, Pgup, Pgdown) work with ksh. These keys works fine with tcsh and zsh.

Today, when I use one of these keys, a tilde ~ is printed.

I find this:


```
bind '^[[3~'=delete-char-forward
bind '^[[1~'=beginning-of-line
bind '^[[4~'=end-of-line
```
The keys works, but always print a tilde ~.

Other solution:


```
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
```
The keys works perfectly, without tilde... But just on of them (prefix-2).

My TERM is xterm-color, and my EDITOR is emacs. These bindbkeys works perfectly with other shells (so the bindkeysa are corrects).

Do you have any idea, or ksh does not support these keys? I found many posts in Internet, and none of them can help me. Man ksh does not answer my question.

Maybe a good solution is the get back to an other shell  But I want to understand this problem.

Thanks for your returns and helps.

Regards.


----------



## vivek (Oct 19, 2009)

Are you using older KSH version? Also make sure you run

```
set -o emacs
```


----------

