home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / etc / inputrc < prev    next >
Text File  |  2006-11-29  |  5KB  |  259 lines

  1. ################################################################################
  2. ## /etc/inputrc
  3. ##
  4. ## Attempt to put different TERMs together in one readline init file.
  5. ## Copyright (c) 1997,2000,2002 SuSE Linux AG, Nuernberg, Germany.
  6. ##
  7. ## Author: Werner Fink
  8. ## Please send feedback to http://www.suse.de/feedback
  9. ##
  10. ################################################################################
  11. #
  12. # Eight bit compatible: Umlaute
  13. #
  14. set meta-flag on
  15. set output-meta on
  16. set convert-meta off
  17. set term xy
  18. #
  19. # VI line editing
  20. #
  21. $if mode=vi
  22. set editing-mode vi
  23. set keymap vi
  24. $endif
  25. #
  26. # Common standard keypad and cursor
  27. #
  28. "\e[1~":    beginning-of-line
  29. "\e[2~":    yank
  30. "\e[3~":    delete-char
  31. "\e[4~":    end-of-line
  32. "\e[5~":    history-search-backward
  33. "\e[6~":    history-search-forward
  34. $if term=xterm
  35. "\e[2;2~":    yank
  36. "\e[3;2~":    delete-char
  37. "\e[5;2~":    history-search-backward
  38. "\e[6;2~":    history-search-forward
  39. "\e[2;5~":    yank
  40. "\e[3;5~":    delete-char
  41. "\e[5;5~":    history-search-backward
  42. "\e[6;5~":    history-search-forward
  43. $endif
  44. "\e[C":        forward-char
  45. "\e[D":        backward-char
  46. "\e[A":        previous-history
  47. "\e[B":        next-history
  48. $if term=xterm
  49. "\e[E":        re-read-init-file
  50. "\e[2C":    forward-word
  51. "\e[2D":    backward-word
  52. "\e[2A":    history-search-backward
  53. "\e[2B":    history-search-forward
  54. "\e[1;2C":    forward-word
  55. "\e[1;2D":    backward-word
  56. "\e[1;2A":    history-search-backward
  57. "\e[1;2B":    history-search-forward
  58. "\e[1;3C":    forward-word
  59. "\e[1;3D":    backward-word
  60. "\e[1;3A":    history-search-backward
  61. "\e[1;3B":    history-search-forward
  62. "\e[5C":    forward-word
  63. "\e[5D":    backward-word
  64. "\e[5A":    history-search-backward
  65. "\e[5B":    history-search-forward
  66. "\e[1;5C":    forward-word
  67. "\e[1;5D":    backward-word
  68. "\e[1;5A":    history-search-backward
  69. "\e[1;5B":    history-search-forward
  70. $else
  71. "\e[G":        re-read-init-file
  72. $endif
  73. #
  74. # Avoid network problems
  75. #   ... \177 (ASCII-DEL) and \010 (ASCII-BS)
  76. #       do `backward-delete-char'
  77. # Note: `delete-char' is maped to \033[3~
  78. #       Therefore xterm's responce on pressing
  79. #       key Delete or KP-Delete should be
  80. #       \033[3~ ... NOT \177
  81. #
  82. "\C-?":        backward-delete-char
  83. "\C-H":        backward-delete-char
  84. #
  85. # Home and End
  86. #
  87. $if term=xterm
  88. #
  89. # Normal keypad and cursor of xterm
  90. #
  91. "\e[1~":    history-search-backward
  92. "\e[4~":    set-mark
  93. "\e[H":        beginning-of-line
  94. "\e[F":        end-of-line
  95. "\e[2H":    beginning-of-line
  96. "\e[2F":    end-of-line
  97. "\e[5H":    beginning-of-line
  98. "\e[5F":    end-of-line
  99. # Home and End of application keypad and cursor of xterm
  100. "\eOH":        beginning-of-line
  101. "\eOF":        end-of-line
  102. "\eO2H":    beginning-of-line
  103. "\eO2F":    end-of-line
  104. "\eO5H":    beginning-of-line
  105. "\eO5F":    end-of-line
  106. $else
  107. $if term=kvt
  108. "\e[1~":    history-search-backward
  109. "\e[4~":    set-mark
  110. "\eOH":        beginning-of-line
  111. "\eOF":        end-of-line
  112. $endif
  113. #
  114. # TERM=linux or console or gnome
  115. #
  116. "\e[1~":    beginning-of-line
  117. "\e[4~":    end-of-line
  118. $endif
  119. #
  120. # Application keypad and cursor of xterm
  121. #
  122. $if term=xterm
  123. "\eOD":         backward-char
  124. "\eOC":         forward-char
  125. "\eOA":         previous-history
  126. "\eOB":         next-history
  127. "\eOE":         re-read-init-file
  128. "\eO2D":        backward-word
  129. "\eO2C":        forward-word
  130. "\eO2A":        history-search-backward
  131. "\eO2B":        history-search-forward
  132. "\eO5D":        backward-word
  133. "\eO5C":        forward-word
  134. "\eO5A":        history-search-backward
  135. "\eO5B":        history-search-forward
  136. # DEC keyboard KP_F1 - KP_F4 or
  137. # XTerm of XFree86 in VT220 mode F1 - F4
  138. "\eOP":        prefix-meta
  139. "\eOQ":        undo
  140. "\eOR":        ""  
  141. "\eOS":        kill-line
  142. $endif
  143. $if term=gnome
  144. # or gnome terminal F1 - F4
  145. "\eOP":        prefix-meta
  146. "\eOQ":        undo
  147. "\eOR":        ""
  148. "\eOS":        kill-line
  149. $endif
  150. #
  151. # Function keys F1 - F12
  152. #
  153. $if term=linux
  154. #
  155. # On console the first five function keys
  156. #
  157. "\e[[A":    prefix-meta
  158. "\e[[B":    undo
  159. "\e[[C":    ""
  160. "\e[[D":    kill-line
  161. "\e[[E":    ""
  162. $else
  163. #
  164. # The first five standard function keys
  165. #
  166. "\e[11~":    prefix-meta
  167. "\e[12~":    undo
  168. "\e[13~":    ""
  169. "\e[14~":    kill-line
  170. "\e[15~":    ""
  171. $endif
  172. "\e[17~":    ""
  173. "\e[18~":    ""
  174. "\e[19~":    ""
  175. "\e[20~":    ""
  176. "\e[21~":    ""
  177. # Note: F11, F12 are identical with Shift_F1 and Shift_F2
  178. "\e[23~":    ""
  179. "\e[24~":    ""
  180. #
  181. # Shift Function keys F1  - F12
  182. #      identical with F11 - F22
  183. #
  184. #"\e[23~":    ""
  185. #"\e[24~":    ""
  186. "\e[25~":    ""
  187. "\e[26~":    ""
  188. # DEC keyboard: F15=\e[28~ is Help
  189. "\e[28~":    ""
  190. # DEC keyboard: F16=\e[29~ is Menu
  191. "\e[29~":    ""
  192. "\e[31~":    ""
  193. "\e[32~":    ""
  194. "\e[33~":    ""
  195. "\e[34~":    ""
  196. $if term=xterm
  197. # Not common
  198. "\e[35~":    ""
  199. "\e[36~":    ""
  200. $endif
  201. #
  202. $if term=xterm
  203. #
  204. # Application keypad and cursor of xterm
  205. # with NumLock ON
  206. #
  207. # Operators
  208. "\eOo":        "/"
  209. "\eOj":        "*"
  210. "\eOm":        "-"
  211. "\eOk":        "+"
  212. "\eOl":        ","
  213. "\eOM":        accept-line
  214. "\eOn":        "."
  215. # Numbers
  216. "\eOp":        "0"
  217. "\eOq":        "1"
  218. "\eOr":        "2"
  219. "\eOs":        "3"
  220. "\eOt":        "4"
  221. "\eOu":        "5"
  222. "\eOv":        "6"
  223. "\eOw":        "7"
  224. "\eOx":        "8"
  225. "\eOy":        "9"
  226. $endif
  227. #
  228. #  EMACS line editing
  229. #
  230. $if mode=emacs
  231. #
  232. # ... xterm application cursor
  233. #
  234. $if term=xterm
  235. "\e\eOD":    backward-word
  236. "\e\eOC":    forward-word
  237. "\e\eOA":    up-history
  238. "\e\eOB":    down-history
  239. "\C-\eOD":    backward-char
  240. "\C-\eOC":    forward-char
  241. "\C-\eOA":    up-history
  242. "\C-\eOB":    down-history
  243. $endif
  244. #
  245. # Standard cursor
  246. #
  247. "\e\e[D":    backward-word
  248. "\e\e[C":    forward-word
  249. "\e\e[A":    up-history
  250. "\e\e[B":    down-history
  251. "\C-\e[D":    backward-char
  252. "\C-\e[C":    forward-char
  253. "\C-\e[A":    up-history
  254. "\C-\e[B":    down-history
  255. $endif
  256. #
  257. # end
  258. #
  259.