Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

In a QNX Neutrino shell I need to use, the delete key doesn't work appropriately. I get a ~ when I press it.

My end goal is to get Delete, Home, and End keys on the keyboard to behave as they do in Windows command shell.

How do I bind the "Delete the character at the cursor" to the Delete keyboard button? My attempts at using an alias were unsucessful.

Notes that may or may not matter, but could provide background:

  • This is PD KSH v5.2.14 99/07/13.2
  • Control-D behaves like I expect the delete button to work.
  • bind shows the following:
bind | grep del
^D = eot-or-delete
^H = delete-char-backward
^? = delete-char-backward
^[^H = delete-word-backward
^[d = delete-word-forward
^[h = delete-word-backward
^[^? = delete-word-backward
^XP = delete-char-forward
ଠ= delete-char-forward
  • infocmp shows the following:
 #      Reconstructed via infocmp from file: /usr/lib/terminfo/x/xterm
xterm|vs100|xterm terminal emulator,
        am, km, mir, msgr, xenl, xon,
        cols#80, it#8, lines#65, vt@,
        bel=^G, blink=@, bold=\E[1m, clear=\E[H\E[2J, cr=^M,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
        el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I,
        hts=\EH, ich=\E[%p1%d@, ich1=\E[2~, il=\E[%p1%dL, il1=\E[L,
        ind=^J, is1=\E=\E[?1l, kBEG=\ENn, kCPY=\ENs, kCRT=\ENt,
        kDL=\ENv, kEXT=\ENw, kFND=\ENx, kHLP=\ENy, kOPT=\ENz,
        ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOq, kcan=\EOm, kclo=\ENc,
        kclr=\ENa, kcmd=\EOu, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
        kcuu1=\E[A, kdch1=\E[P, kend=\E[9, kf1=\E[11~, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~,
        kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
        kf9=\E[20~, kfnd=\ENf, khlp=\ENh, khome=\E[8, khts=\ENb,
        kich1=\E[2~, kmov=\ENi, kmrk=\ENm, kmsg=\ENe, knp=\E[6~,
        kopn=\ENo, kopt=\ENk, kpp=\E[5~, kref=\ENl, kres=\ENp,
        krfr=\ENg, krpl=\ENr, krst=\ENj, ksav=\ENq, kslt=\EOM,
        ktbc=\ENd, kund=\ENu, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
        rmam=\E[?7l, rmkx=\E>, rmso=\E[m,
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=@,
        sgr0=\E[m, smacs=^N, smam=\E[?7h, smkx=\E=, smso=\E[7m,
  • stty shows the following:
Name:  /dev/ttyp0
Type:  pseudo
Opens: 2
+edit +echok +echonl
 intr=^C  quit=^\ erase=^?  kill=^U   eof=^D start=^Q  stop=^S  susp=^Z
lnext=^V   min=01  time=00   pr1=^[   pr2=5B  left=44 right=43    up=41
 down=42   ins=40   del=50  home=48   end=59
  • Control A and Control E behave like I would like the Home and End keys to

Hopefully this is really easy points for someone... I just don't know enough of how to put this together.

share|improve this question
up vote 0 down vote accepted

For Googlers:


bind '^[[3'=prefix-2
bind '^[[3~'=delete-char-forward
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .