the `del` key
Results 1 to 13 of 13

Thread: the `del` key

  1. #1
    Join Date
    Nov 2000
    Location
    buenos aires
    Posts
    335

    the `del` key

    i have a strange problem, the `del` key does not work on my bash shell. everytime i press it, it echoes a `~` to the screen. the `backspace` key works just fine.
    is there a way around that?
    thank you very much.

  2. #2
    Join Date
    Mar 2000
    Location
    Elyria, Ohio - USA
    Posts
    2,075
    Do a:

    stty -a

    What is the erase character set for? It should be set for ^H. If it's anything else, you can chane it by typing:

    stty erase ^V^H

    The ^V is Ctrl + V allowing you to enter the next character CTL + H.

    If you had to do the above, then you can add that line to your .profile, .bashrc or .bash_profile, sothis is done every time you login or open a new window. -mk

    ------------------
    If it ain't broke, fix it till it is.
    If it ain't broke,
    Fix it till it is.

  3. #3
    Join Date
    Nov 2000
    Location
    buenos aires
    Posts
    335
    thanks mike.

  4. #4
    Join Date
    Mar 2000
    Location
    Elyria, Ohio - USA
    Posts
    2,075
    Hictio, did it work?

    ------------------
    If it ain't broke, fix it till it is.
    If it ain't broke,
    Fix it till it is.

  5. #5
    Join Date
    Nov 2000
    Location
    buenos aires
    Posts
    335
    sorry, i have to wait until i can get my hands on my `linux box`, i`m at work right now, i use linux only during the nights. a `closet linux newbie`, if might say so.
    let know asap, but anyways, thank you is the intention what really matters.

  6. #6
    Join Date
    Nov 2000
    Location
    buenos aires
    Posts
    335
    i`m afraidit didn`t work, if you have another idea, i`m all ears. afteri did what you told me to, it keeps printing the same charcater, `~`, when i press the `delete` key.
    thanks in advance.

    [This message has been edited by hictio (edited 02-27-2001).]

  7. #7
    Join Date
    Mar 2000
    Location
    Elyria, Ohio - USA
    Posts
    2,075
    If you type stty -a, what is the erase character set to? -mk

    ------------------
    If it ain't broke, fix it till it is.
    If it ain't broke,
    Fix it till it is.

  8. #8
    Join Date
    Nov 2000
    Location
    buenos aires
    Posts
    335
    the stty is set to what you told to.
    it was set to ^?, can you believe that?
    you know, mike, i think that the key doesn`t work because i`m using a spanish keyboard layout... have set it

  9. #9
    Join Date
    Mar 2000
    Location
    Elyria, Ohio - USA
    Posts
    2,075
    The erase character should be set to ^H, not ^?. If you don't have an h character, you can also enter it with the hex ascii number for h as in:

    stty erase 0x008

    -mk

    ------------------
    If it ain't broke, fix it till it is.
    If it ain't broke,
    Fix it till it is.

  10. #10
    Join Date
    Mar 2000
    Location
    Elyria, Ohio - USA
    Posts
    2,075
    up

    ------------------
    If it ain't broke, fix it till it is.
    If it ain't broke,
    Fix it till it is.

  11. #11
    Join Date
    Nov 2000
    Location
    buenos aires
    Posts
    335
    i`ll try setting it thru the ascii number, let you know what happens. is very annoying.
    thanks a lot tho.

  12. #12
    Join Date
    Nov 2000
    Location
    buenos aires
    Posts
    335
    hey mike i found out how to deal with the `del` key.
    all i have to do was to add the following to the ~/.inputrc file.

    set editing-mode emacs
    "\e[3~":delete-char

    since i didn`t have that file, i had to create it.
    this works for bash.
    anyways, man, thanks a lot.

  13. #13
    Join Date
    Mar 2000
    Location
    Elyria, Ohio - USA
    Posts
    2,075
    Good work, hictio.

    ------------------
    If it ain't broke, fix it till it is.
    If it ain't broke,
    Fix it till it is.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •