2
0

UNIXbindings.cpp 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ! $XConsortium: UNIXbindings.src /main/2 1995/07/20 12:05:57 drk $
  2. !######################################################################
  3. !#
  4. !# UNIXbindings
  5. !#
  6. !# Common Desktop Environment (CDE)
  7. !#
  8. !# Provides EMACS style translations for DtEditor widget applications
  9. !# such as Dtpad and Dtmail. Also provides alternates for DtEditor
  10. !# widget application menu accelerators which confict with these
  11. !# translations.
  12. !#
  13. !# By default this file is not used by DtEditor widget applications.
  14. !# To enable these bindings, include this file in your home directory
  15. !# .Xdefaults file and then restart your session. Initially, you can
  16. !# include this file simply by inserting a #include directive in your
  17. !# .Xdefaults file:
  18. !#
  19. !# #include "/usr/dt/app-defaults/LANG/UNIXbindings"
  20. !#
  21. !# where LANG is the value of your $LANG environment variable
  22. !# (normally "C").
  23. !#
  24. !# To modifiy these bindings, insert the contents of this file directly
  25. !# in your .Xdefaults file instead of the above include directive.
  26. !# Then edit the bindings in your .Xdefaults file (and restart your
  27. !# session when done).
  28. !#
  29. !#
  30. !# (c) Copyright 1993, 1994 Hewlett-Packard Company
  31. !# (c) Copyright 1993, 1994 International Business Machines Corp.
  32. !# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  33. !# (c) Copyright 1993, 1994 Novell, Inc.
  34. !#
  35. !######################################################################
  36. !######################################################################
  37. !# Dtpad overrides for menu accelerators and accelerator text which
  38. !# confict with the UNIX bindings.
  39. !######################################################################
  40. Dtpad*fileMenu.print.acceleratorText:
  41. Dtpad*fileMenu.print.accelerator:
  42. Dtpad*editMenu.undo.acceleratorText: Ctrl+_
  43. Dtpad*editMenu.undo.accelerator: Ctrl<Key>_
  44. Dtpad*editMenu.paste.acceleratorText: Shift+Insert
  45. Dtpad*editMenu.paste.accelerator: Shift<Key>osfInsert
  46. Dtpad*editMenu.findChange.acceleratorText: Ctrl+S
  47. Dtpad*editMenu.findChange.accelerator: Ctrl<Key>s
  48. !######################################################################
  49. !# Dtmail compose dialog overrides for menu accelerators and accelerator
  50. !# text which confict with the UNIX bindings.
  51. !######################################################################
  52. Dtmail*ComposeDialog*menubar*Edit.Undo.acceleratorText: Ctrl+_
  53. Dtmail*ComposeDialog*menubar*Edit.Undo.accelerator: Ctrl<Key>_
  54. Dtmail*ComposeDialog*menubar*Edit.Paste.acceleratorText: Shift+Insert
  55. Dtmail*ComposeDialog*menubar*Edit.Paste.accelerator: Shift<Key>osfInsert
  56. Dtmail*ComposeDialog*menubar*Edit.Find/Change.acceleratorText: Ctrl+S
  57. Dtmail*ComposeDialog*menubar*Edit.Find/Change.accelerator: Ctrl<Key>s
  58. !######################################################################
  59. !# UNIX Bindings.
  60. !#
  61. !# The following translations provide (GNU style) EMACS control and
  62. !# meta key bindings plus some additional bindings. When appropriate,
  63. !# they also allow the Shift key to be used in combination with the
  64. !# normal binding to reverse the direction of the operation. For
  65. !# example, Ctrl-Shift-F will move the cursor backward a character
  66. !# since Ctrl-F normally moves it forward a character.
  67. !#
  68. !# The additional bindings are:
  69. !#
  70. !# Ctrl-comma: backward-word Ctrl-Shift-comma: forward-word
  71. !# Ctrl-period: forward-word Ctrl-Shift-period: backward-word
  72. !# Ctrl-Return: end-of-file Ctrl-Shift-Return: beginning-of-file
  73. !#
  74. !# NOTES:
  75. !#
  76. !# o GNU EMACS binds delete-previous-character() rather than
  77. !# delete-next-character() to the Delete key.
  78. !# o Meta-F is normally the mnemonic for the File menu so the binding
  79. !# to forward-word() will be ignored.
  80. !#
  81. !######################################################################
  82. *DtEditor.textTranslations: \
  83. c ~s <Key>a: beginning-of-line()\n\
  84. c s <Key>a: end-of-line()\n\
  85. c ~s <Key>b: backward-character()\n\
  86. c s <Key>b: forward-character()\n\
  87. c ~s <Key>b: backward-character()\n\
  88. c s <Key>b: backward-word()\n\
  89. m ~s <Key>b: backward-word()\n\
  90. m s <Key>b: forward-word()\n\
  91. c ~s <Key>d: delete-next-character()\n\
  92. c s <Key>d: delete-previous-character()\n\
  93. m ~s <Key>d: kill-next-word()\n\
  94. m s <Key>d: kill-previous-word()\n\
  95. c ~s <Key>e: end-of-line()\n\
  96. c s <Key>e: beginning-of-line()\n\
  97. c ~s <Key>f: forward-character()\n\
  98. c s <Key>f: backward-character()\n\
  99. m ~s <Key>f: forward-word()\n\
  100. m s <Key>f: backward-word()\n\
  101. c <Key>j: newline-and-indent()\n\
  102. c ~s <Key>k: kill-to-end-of-line()\n\
  103. c s <Key>k: kill-to-start-of-line()\n\
  104. c <Key>l: redraw-display()\n\
  105. c <Key>m: newline()\n\
  106. c ~s <Key>n: process-down()\n\
  107. c s <Key>n: process-up()\n\
  108. c <Key>o: newline-and-backup()\n\
  109. c ~s <Key>p: process-up()\n\
  110. c s <Key>p: process-down()\n\
  111. c ~s <Key>u: kill-to-start-of-line()\n\
  112. c s <Key>u: kill-to-end-of-line()\n\
  113. c ~s <Key>v: next-page()\n\
  114. c s <Key>v: previous-page()\n\
  115. m ~s <Key>v: previous-page()\n\
  116. m s <Key>v: next-page()\n\
  117. c <Key>w: kill-selection()\n\
  118. c ~s <Key>y: unkill()\n\
  119. m <Key>]: forward-paragraph()\n\
  120. m <Key>[: backward-paragraph()\n\
  121. c ~s <Key>comma: backward-word()\n\
  122. c s <Key>comma: forward-word()\n\
  123. m <Key>\\<: beginning-of-file()\n\
  124. c ~s <Key>period: forward-word()\n\
  125. c s <Key>period: backward-word()\n\
  126. m <Key>\\>: end-of-file()\n\
  127. c ~s <Key>Return: end-of-file()\n\
  128. c s <Key>Return: beginning-of-file()\n\
  129. ~c ~s ~m ~a <Key>osfDelete: delete-previous-character()\n\
  130. ~c s ~m ~a <Key>osfDelete: delete-next-character()
  131. !########################### eof ###########################