home, end, delete, page up/down keys not working - BSD

This is a discussion on home, end, delete, page up/down keys not working - BSD ; Hi all, I am having a bit of frustration with the openbsd default shell (ksh), I am used to working in a linux bash shell and need the have fore- mentioned keys "working" as normal. I get a tilde (~) ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: home, end, delete, page up/down keys not working

  1. home, end, delete, page up/down keys not working

    Hi all,
    I am having a bit of frustration with the openbsd default shell (ksh),
    I am used to working in a linux bash shell and need the have fore-
    mentioned keys "working" as normal. I get a tilde (~) sign as output
    whenever I use one of these keys. My $TERM is vt220. Any suggestions?

  2. Re: home, end, delete, page up/down keys not working

    ....
    > What do you want to happen when you use these keys?

    ....

    home - begining of line (ctrl-a)
    end - end of line (ctrl-e)
    delete - delete character (ctrl-d)
    page-up/down - scroll buffer

    I suppose I should just get used to using the ctrl-x keys instead...


  3. Re: home, end, delete, page up/down keys not working

    On Fri, 26 Sep 2008 02:08:04 -0700 (PDT), Brendon G. wrote:
    > Hi all,
    > I am having a bit of frustration with the openbsd default shell (ksh),
    > I am used to working in a linux bash shell and need the have fore-
    > mentioned keys "working" as normal. I get a tilde (~) sign as output
    > whenever I use one of these keys. My $TERM is vt220. Any suggestions?


    I've tried to do the same thing, and I think you can only get one to work
    at a time. I opted for the delete key, which works with the following
    bind commands:

    bind '^[[3'=prefix-2
    bind '^[[3~'=delete-char-forward

    If you want home, try these:

    bind '^[[1'=prefix-2
    bind '^[[1~'=beginning-of-line

    And end is like this:

    bind '^[[4'=prefix-2
    bind '^[[4~'=end-of-line

    If you try doing all three pairs in the same shell, all three keys will be
    mapped to the last action you specified. So, if you did the binds in the
    order I've typed them above, the home, end, and delete keys would all map
    to end-of-line. It's a little frustrating.

  4. Re: home, end, delete, page up/down keys not working

    On Sat, 27 Sep 2008 12:06:38 +0000 (UTC),
    Shane Almeida wrote:
    >
    > I've tried to do the same thing, and I think you can only get one to work
    > at a time. I opted for the delete key, which works with the following
    > bind commands:


    I don't have openbsd's (pd)ksh here, but looking at the example in the
    manpage I think you could try bind '^[['=prefix-2 instead.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  5. Re: home, end, delete, page up/down keys not working

    Hi,

    did you try this two? Read the ksh(1) man page.

    $ grep ENV ~/.profile
    export ENV=$HOME/.kshrc

    $ cat ~/.kshrc
    #
    .. /etc/ksh.kshrc
    export PS1="\u@\H:\w\n\\$ "
    case $UID in
    0) ulimit -n 256
    ;;
    *)
    ulimit -p 128
    ulimit -n 256
    ;;
    esac
    #
    if [ -o interactive ]; then
    case "$TERM" in
    vt220)
    bind '^[[3'=prefix-2 # DEL
    bind '^[[3~'=delete-char-forward # DEL
    ;;
    xterm*)
    export TERM=xterm-color # force color
    bind '^XH'=beginning-of-line # Pos1
    bind '^XF'=end-of-line # End
    ;;
    nxterm)
    bind '^XH'=beginning-of-line # Pos1
    bind '^XF'=end-of-line # End
    ;;
    *) ;;
    esac
    fi
    #


  6. Re: home, end, delete, page up/down keys not working

    On 27 Sep 2008 13:54:52 GMT, jpd wrote:
    > On Sat, 27 Sep 2008 12:06:38 +0000 (UTC),
    > Shane Almeida wrote:
    >>
    >> I've tried to do the same thing, and I think you can only get one to work
    >> at a time. I opted for the delete key, which works with the following
    >> bind commands:

    >
    > I don't have openbsd's (pd)ksh here, but looking at the example in the
    > manpage I think you could try bind '^[['=prefix-2 instead.


    Home, end, and delete function with that approach, except that each of
    them prints an extra '~' character. So, for example, if you hit the home
    key, your cursor will move to the start of the line, then a ~ will show
    up, and your cursor will be at the second character. Delete will replace
    the current character with a ~ and end will move the cursor to the end of
    the line and add an extra ~.

  7. Re: home, end, delete, page up/down keys not working

    On Sat, 27 Sep 2008 19:27:26 +0000 (UTC), wrote:
    > Hi,
    >
    > did you try this two? Read the ksh(1) man page.


    Yup, doesn't work. Home, end, and delete all just beep and print a tilde
    with those binds.

  8. Re: home, end, delete, page up/down keys not working

    On Sep 26, 11:08*am, "Brendon G." wrote:
    > Hi all,
    > I am having a bit of frustration with the openbsd default shell (ksh),
    > I am used to working in a linux bash shell and need the have fore-
    > mentioned keys "working" as normal. I get a tilde (~) sign as output
    > whenever I use one of these keys. My $TERM is vt220. Any suggestions?


    I think I will just get accustomed to using the default emacs mode key
    bindings, It makes more sense to learn to use the default openbsd
    shell environment...

+ Reply to Thread