home *** CD-ROM | disk | FTP | other *** search
/ norge.freeshell.org (192.94.73.8) / 192.94.73.8.tar / 192.94.73.8 / pub / sdf / faq / BASICS / 13 < prev    next >
Text File  |  2006-02-19  |  3KB  |  60 lines

  1. [13] WHY DOES BACKSPACE AND DELETE NOT WORK HERE?
  2.  
  3.   The question should be:  
  4.  
  5.   "WHY DO THE BACKSPACE AND DELETE KEYS WORK INCONSISTENTLY ON COMPUTERS?" 
  6.  
  7.   The reason requires a history lesson, but you probably aren't interested
  8.   in learning why it has become inconsistent and would rather just fix it
  9.   and move on.  If that is what you want, then type:
  10.  
  11.   $ stty erase '^H'
  12.  
  13.       - or -
  14.  
  15.   $ stty erase '^?'
  16.  
  17.   There is no way to know for sure which will work for you, so try them both.
  18.   Alternatively you could type 'stty erase ' and then your backspace key. 
  19.   (NOTE: don't type the ' symbols and also, mind the whitespace .. but you 
  20.   probably don't even understand that, so just try the two examples above).
  21.  
  22.   If one of them works for you, then put the one that did in your .profile
  23.  
  24.   A HISTORY LESSON
  25.  
  26.   So why do we have [RUBOUT], [DELETE/DEL], [ERASE] and [BACKSPACE/BKSP]
  27.   keys on (some) computer keyboards?  It actually goes back to the input
  28.   devices used to create punched cards and papertape.  These devices were
  29.   similar to manual typewriters.  They would punch holes into a paper media
  30.   that could then be read by a computer later on.  While we all strive to be
  31.   perfect typists, we all create mistakes ... once you punch holes into
  32.   paper, its nearly impossible to get the 'chads' you've created back in to
  33.   repunch.  So a correction was made by pressing the [BACKSPACE] key, which 
  34.   would move the carriage back one character space and you would then press
  35.   the [DELETE] key to punch all the bits out of that space.
  36.  
  37.                 ASCII      HEX    OCTAL    DEC   CHAR
  38.              ----------------------------------------
  39.              ASCII BS     0x08     0010      8     ^H
  40.              ASCII DEL    0x7F     0177    127     ^?
  41.  
  42.   When input devices were developed that allowed users to program directly
  43.   into a computer and store programs as files on disks (or have the computer
  44.   punch the tape or card stack for you once you had properly typed in and ran
  45.   your program), the behaviour of the aforementioned keys became inconsistent.
  46.   Most people probably expect [BACKSPACE/BKSP] to move the cursor to the left
  47.   erasing characters as you press it, and the [DELETE/DEL] key not moving the
  48.   cursor, but 'eating' characters and whitespace from the right. 
  49.  
  50.   A USER'S PERSPECTIVE
  51.  
  52.   On my Symbolics LISPM keyboard I have a [RUBOUT], [DELETE] and [ERASE]
  53.   key .. but on my Apple Powerbook I just have a [DELETE] key.  The [RUBOUT]
  54.   key is located where your [CAPS LOCK] key is, so in order to rubout 
  55.   characters, you use the pinky on your left hand.  On the Powerbook I have
  56.   to use my right hand to press the [DELETE] key which is located all the way
  57.   up (and out of the home row position) in the top right hand corner of the
  58.   keyboard.  The LISPM keyboard might sound weird, but you get used to it
  59.   really quick if you are a traditional 'home row' touch typist.  
  60.