home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / aix / 11695 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  8.6 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!news.Brown.EDU!noc.near.net!pacvax!markeatonmac
  2. From: eaton@pacersoft.com (Mark W. Eaton)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: GNU emacs
  5. Message-ID: <eaton-181192134048@markeatonmac.pacersoft.com>
  6. Date: 18 Nov 92 18:47:22 GMT
  7. References: <1992Nov17.034640.28336@chpc.utexas.edu>
  8. Sender: news@pacvax.UUCP
  9. Followup-To: comp.unix.aix
  10. Organization: Pacer Software, Inc.
  11. Lines: 219
  12. Nntp-Posting-Host: markeatonmac
  13.  
  14. In article <1992Nov17.034640.28336@chpc.utexas.edu>, jones@chpc.utexas.edu
  15. (Willaim L. Jones) wrote:
  16. > Has anyone one noticed that arrow keys do not work in gnu emacs 18.59-15.57.
  17. > Does anyone have a solution or any insights to the problem.
  18. > My only insight is the fact that AIX does not give emacs all of the 
  19. > characters that the arrow key generates to emacs at the same time 
  20. > like every other system.
  21. > Bill Jones
  22.  
  23. Yes, keymapping is a mess under AIX compared to any other Unix system. 
  24. Since I still haven't gotten emacs working fully with my customizations (I
  25. use both the arrow keys and the keypad), I use emacs on another Unix system
  26. and edit the files I need over NFS.  I hav a file from some kind netter
  27. below which exemplifies the kind of work needed to map keys correctly. 
  28. Unfortunately, I don't have the netter's name, but let him/her be thanked
  29. here.
  30.  
  31. FWIW, this has been heavily customized; you should extract the bits you
  32. need.
  33.  
  34. Mark Eaton
  35. Pacer Software, Inc.
  36. eaton@pacersoft.com
  37.  
  38. ! .keymap - An example for xterm keymaps.
  39. !
  40. ! Default keymap: keypad is in NumLock state.
  41. ! ScrollLock switches to emacs-keymap, F10 to ftp-keymap.
  42. ! A few other keys also have special effects.
  43. !
  44. *VT100.Translations: #override \
  45.     Mod1 Shift<Key>A:    string(0x43) \n\
  46.     Mod1    <Key>A:        string(0x63) \n\
  47.     Mod1    <Key>Delete:    string(0x17) \n\
  48.     Shift    <Key>Delete:    string(0x7f) \n\
  49.         <Key>Delete:    string(0x08) \n\
  50.         <Key>L2:    string("!!") string(0x0d) \n\
  51.         <Key>L4:    string(0x03) \n\
  52.         <Key>Linefeed:    string(" | more") string(0x0d) \n\
  53.         <Key>F10:    keymap(ftp) \n\
  54.         <Key>R1:    string("(") \n\
  55.         <Key>R2:    string(")") \n\
  56.         <Key>R3:    keymap(emacspad) \n\
  57.         <Key>Num_Lock:    ignore() \n\
  58.         <Key>R4:    string("=") \n\
  59.         <Key>R5:    string("/") \n\
  60.         <Key>R6:    string("*") \n\
  61.         <Key>KP_Subtract: string("-") \n\
  62.         <Key>R7:    string("7") \n\
  63.         <Key>Up:    string("8") \n\
  64.         <Key>R9:    string("9") \n\
  65.         <Key>KP_Add:    string("+") \n\
  66.         <Key>Left:    string("4") \n\
  67.         <Key>R11:    string("5") \n\
  68.         <Key>Right:    string("6") \n\
  69.         <Key>R13:    string("1") \n\
  70.         <Key>Down:    string("2") \n\
  71.         <Key>R15:    string("3") \n\
  72.         <Key>Insert:    string("0") \n\
  73.         <Key>KP_Decimal: string(".") \n\
  74.         <Key>KP_Enter:    string(0x0d)
  75.  
  76. ! Emacs keymap:
  77. ! L* and F* keys are bound to the default escape sequences. Modify to suit
  78. ! your taste ...
  79. ! The right keypad sends different strings for different modifier states:
  80. ! Unmodified keys generally do what you'd expect.
  81. ! <Control> send modified movement commands (like forward-word ...)
  82. ! <Shift> and <Lock> generally send the characters printed on the keys.
  83. ! <Meta> sends the associated number as numeric argument for a command.
  84. ! Numlock switches back to the default keymap.
  85. ! Some bindings refer to elisp functions I made up. I have listed these
  86. ! further below. See for yourself whether you find them useful.
  87. !
  88. *VT100.emacspadKeymap.translations: \
  89.         <Key>Delete:    string(0x7f) \n\
  90.         <Key>L1:    keymap(None) string(0x1b) string("[192z") \n\
  91.         <Key>L2:    string(0x1b) string("[193z") \n\
  92.         <Key>L3:    string(0x1b) string("[194z") \n\
  93.         <Key>L4:    string(0x1b) string("[195z") \n\
  94.         <Key>L5:    string(0x1b) string("[196z") \n\
  95.         <Key>L6:    string(0x1b) string("[197z") \n\
  96.         <Key>L7:    string(0x1b) string("[198z") \n\
  97.         <Key>L8:    string(0x1b) string("[199z") \n\
  98.         <Key>L9:    string(0x1b) string("[200z") \n\
  99.         <Key>L10:    string(0x1b) string("[201z") \n\
  100.         <Key>F1:    string(0x1b) string("[224z") \n\
  101.         <Key>F2:    string(0x1b) string("[225z") \n\
  102.         <Key>F3:    string(0x1b) string("[226z") \n\
  103.         <Key>F4:    string(0x1b) string("[227z") \n\
  104.         <Key>F5:    string(0x1b) string("[228z") \n\
  105.         <Key>F6:    string(0x1b) string("[229z") \n\
  106.         <Key>F7:    string(0x1b) string("[230z") \n\
  107.         <Key>F8:    string(0x1b) string("[231z") \n\
  108.         <Key>F9:    string(0x1b) string("[232z") \n\
  109.         <Key>F10:    string(0x1b) string("[233z") \n\
  110.         <Key>KP_F1:     string(0x1b) string("[234z") \n\
  111.         <Key>KP_F2:     string(0x1b) string("[235z") \n\
  112.         <Key>KP_F3:    string(0x1b) string("[236z") \n\
  113.         <Key>KP_F4:    string(0x1b) string("[237z") \n\
  114.         <Key>Break:    string(0x1b) string("[223z") \n\
  115.         <Key>Help:    string(0x08) \n\
  116.         <Key>R1:    string(0x18) string(0x02) \n\
  117.         <Key>R2:    string(0x1b) \
  118.                 string("xelectric-command-history") \
  119.                 string(0x0d) \n\
  120.         <Key>R3:    string(0x07) \n\
  121.         <Key>Num_Lock:    keymap(None) \n\
  122.     Ctrl    <Key>R4:    string(0x1b) string("xgoto-line") \
  123.                 string(0x0d) \n\
  124.     Mod1    <Key>R4:    string(0x1b) string("xwhat-cursor-position") \
  125.                 string(0x0d) \n\
  126.     Shift    <Key>R4:    string("=") \n\
  127.     Lock    <Key>R4:    string("=") \n\
  128.         <Key>R4:    string(0x1b) string("xwhat-line") \
  129.                 string(0x0d) \n\
  130.     Ctrl    <Key>R5:    string(0x12) \n\
  131.     Mod1    <Key>R5:    string(0x1b) string("xre-search-forward") \
  132.                 string(0x0d) \n\
  133.     Shift    <Key>R5:    string("/") \n\
  134.     Lock    <Key>R5:    string("/") \n\
  135.         <Key>R5:    string(0x13) \n\
  136.     Ctrl    <Key>R6:    string(0x1b) string("xtoggle-read-only") \
  137.                 string(0x0d) \n\
  138.     Mod1    <Key>R6:    string(0x1b) string("xrevert-buffer")\n\
  139.     Shift    <Key>R6:    string("*") \n\
  140.     Lock    <Key>R6:    string("*") \n\
  141.         <Key>R6:    string(0x1b) string("xauto-fill-mode") \
  142.                 string(0x0d) \n\
  143.     Ctrl    <Key>KP_Subtract: string(0x1b) string("k") \n\
  144.     Mod1    <Key>KP_Subtract: string(0x1b) string("-") \n\
  145.     Shift    <Key>KP_Subtract: string("-") \n\
  146.     Lock    <Key>KP_Subtract: string("-") \n\
  147.         <Key>KP_Subtract: string(0x0b) \n\
  148.     Ctrl    <Key>R7:    string(0x1b) string("xbackward-beg-of-line") \
  149.                 string(0x0d) \n\
  150.     Mod1    <Key>R7:    string(0x1b) string("7") \n\
  151.     Shift    <Key>R7:    string("7") \n\
  152.     Lock    <Key>R7:    string("7") \n\
  153.         <Key>R7:    string(0x1b) string("<") \n\
  154.     Ctrl    <Key>Up:    string(0x1b) string("xbackward-paragraph") \
  155.                 string(0x0d) \n\
  156.     Mod1    <Key>Up:    string(0x1b) string("8") \n\
  157.     Shift    <Key>Up:    string("8") \n\
  158.     Lock    <Key>Up:    string("8") \n\
  159.         <Key>Up:    string(0x10) \n\
  160.     Ctrl    <Key>R9:    string(0x1b) string("xbackward-end-of-line") \
  161.                 string(0x0d) \n\
  162.     Mod1    <Key>R9:    string(0x1b) string("9") \n\
  163.     Shift    <Key>R9:    string("9") \n\
  164.     Lock    <Key>R9:    string("9") \n\
  165.         <Key>R9:    string(0x1b) string("v") \n\
  166.     Ctrl    <Key>KP_Add:    string(0x18) string("1") \n\
  167.     Mod1    <Key>KP_Add:    string(0x18) string("2") \n\
  168.     Shift    <Key>KP_Add:    string("+") \n\
  169.     Lock    <Key>KP_Add:    string("+") \n\
  170.         <Key>KP_Add:    string(0x18) string("o") \n\
  171.     Ctrl    <Key>Left:    string(0x1b) string("b") \n\
  172.     Mod1    <Key>Left:    string(0x1b) string("4") \n\
  173.     Shift    <Key>Left:    string("4") \n\
  174.     Lock    <Key>Left:    string("4") \n\
  175.         <Key>Left:    string(0x02) \n\
  176.     Ctrl    <Key>R11:    string(0x1b) string("xback-to-indentation") \
  177.                 string(0x0d) \n\
  178.     Mod1    <Key>R11:    string(0x1b) string("5") \n\
  179.     Shift    <Key>R11:    string("5") \n\
  180.     Lock    <Key>R11:    string("5") \n\
  181.         <Key>R11:    string(0x0c) \n\
  182.     Ctrl    <Key>Right:    string(0x1b) string("f") \n\
  183.     Mod1    <Key>Right:    string(0x1b) string("6") \n\
  184.     Shift    <Key>Right:    string("6") \n\
  185.     Lock    <Key>Right:    string("6") \n\
  186.         <Key>Right:    string(0x06) \n\
  187.     Ctrl    <Key>R13:    string(0x1b) string("xforward-beg-of-line") \
  188.                 string(0x0d) \n\
  189.     Mod1    <Key>R13:    string(0x1b) string("1") \n\
  190.     Shift    <Key>R13:    string("1") \n\
  191.     Lock    <Key>R13:    string("1") \n\
  192.         <Key>R13:    string(0x1b) string(">") \n\
  193.     Ctrl    <Key>Down:    string(0x1b) string("xforward-paragraph") \
  194.                 string(0x0d) \n\
  195.     Mod1    <Key>Down:    string(0x1b) string("2") \n\
  196.     Shift    <Key>Down:    string("2") \n\
  197.     Lock    <Key>Down:    string("2") \n\
  198.         <Key>Down:    string(0x0e) \n\
  199.     Ctrl    <Key>R15:    string(0x1b) string("xforward-end-of-line") \
  200.                 string(0x0d) \n\
  201.     Mod1    <Key>R15:    string(0x1b) string("3") \n\
  202.     Shift    <Key>R15:    string("3") \n\
  203.     Lock    <Key>R15:    string("3") \n\
  204.         <Key>R15:    string(0x16) \n\
  205.     Ctrl    <Key>Insert:    string(0x1b) string("xforward-to-indentation")\
  206.                 string(0x0d) \n\
  207.     Mod1    <Key>Insert:    string(0x1b) string("0") \n\
  208.     Shift    <Key>Insert:    string("0") \n\
  209.     Lock    <Key>Insert:    string("0") \n\
  210.         <Key>Insert:    string(0x1b) string("xset-mark-command") \
  211.                 string(0x0d) \n\
  212.     Ctrl    <Key>KP_Decimal: string(0x1b) string("d") \n\
  213.     Mod1    <Key>KP_Decimal: string(0x1b) string(".") \n\
  214.     Shift    <Key>KP_Decimal: string(".") \n\
  215.     Lock    <Key>KP_Decimal: string(".") \n\
  216.         <Key>KP_Decimal: string(0x04) \n\
  217.         <Key>Alt_L:    string(0x18) \n\
  218.         <Key>Alt_R:    string(0x18) string("4") \n\
  219.         <Key>Super_R:    string(0x03)
  220.  
  221. ! ftp keymap: avoid typos when I ftp ...
  222. *VT100.ftpKeymap.translations: \
  223.         <Key>R3:    keymap(emacspad) \n\
  224.         <Key>Num_Lock:    keymap(None) \n\
  225.         <Key>F10:    string("ftp ") \n\
  226.         <Key>KP_F1:    string("anonymous") string(0x0d) \n\
  227.         <Key>KP_F2:    string("* put your email address here *") \
  228.                 string(0x0d)
  229.