No backspace but delete works... Huh?

Recently we switched from HP9000 Unix boxes (running hpux) to nice PC's running Red Hat 5.2. We use the computer to run in-house software that controls a variety of equipment via the HPIB (hewlett packards GPIB). My questions are:

1. Does anyone know where we can get GPIB drivers for Mandrake or even RH 6.0?

2. The backspace key works when you are in a linux terminal but not in the program we use most. The delete key makes the cursor go backward however. I think the program is C code, but can find all details for anyone who can help. Is there a line of code we can modify in this main program that will load a keymap or something?  All other keys good, just no backspace.  Thanks alot!  Nice Forum BTW!  
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

bcwhiteConnect With a Mentor Commented:
Can't help with #1, but...

Unix has two traditional "erase" characters:  Backspace (0x08=="^H") and Delete (0x7F=="^?").  Depending on the flavor of unix, it will expect one or the other.

Debian Linux likes Delete as the "erase" character, but other distributions may vary.  Linux shells and applications, being the advanced and generally clever system that it is, usually accept either.

To change the "erase" character under Unix, use the "stty" command.

  stty erase "^H"     (use backspace as "erase")
  stty erase "^?"     (use delete as "erase")

Note that the "^H" and "^?" are typed as two separate characters, a caret (^) and a letter (H or ?).

If neither of the above settings fixes your problem, then line editing is being handled within your program instead of by the terminal driver, and thus needs to be found/fixed in your source code.

-- Brian
DanBrannanAuthor Commented:
Thanks Brian!  
All Courses

From novice to tech pro — start learning today.