Git init
[framework/uifw/xorg/lib/libxaw.git] / src / TextTr.c
1 /*
2
3 Copyright 1991, 1994, 1998  The Open Group
4
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
24
25 */
26
27 /* INTERNATIONALIZATION:
28
29 The OMRON R5 contrib added the following action to the old TextTr:
30
31         Ctrl<Key>backslash:     reconnect-im()
32
33 This is needed when the im is killed or otherwise becomes unreachable.
34 This keystroke is evil (inconvenient, hard-to-remember, not obvious)
35 so I am adding one more translation:
36
37         <Key>Kanji:             reconnect-im()
38
39 The Japanese user typically hits their Kanji key when they want to do
40 input.  This merely makes sure the input is connected.
41 */
42
43 #include <X11/Xaw/Text.h>
44
45 char _XawDefaultTextTranslations[] =
46 "c<Key>A:"              "beginning-of-line()\n"
47 "c<Key>B:"              "backward-character()\n"
48 "c<Key>C:"              "insert-selection(CUT_BUFFER0)\n"
49 "c<Key>D:"              "delete-next-character()\n"
50 "c<Key>E:"              "end-of-line()\n"
51 "c<Key>F:"              "forward-character()\n"
52 #ifndef OLDXAW
53 "c<Key>G:"              "keyboard-reset()\n"
54 #else
55 "c<Key>G:"              "multiply(Reset)\n"
56 #endif
57 "c<Key>H:"              "delete-previous-character()\n"
58 "c<Key>J:"              "newline-and-indent()\n"
59 "c<Key>K:"              "kill-to-end-of-line()\n"
60 "c<Key>L:"              "redraw-display()\n"
61 "c<Key>M:"              "newline()\n"
62 "c<Key>N:"              "next-line()\n"
63 "c<Key>O:"              "newline-and-backup()\n"
64 "c<Key>P:"              "previous-line()\n"
65 "c<Key>R:"              "search(backward)\n"
66 "c<Key>S:"              "search(forward)\n"
67 "c<Key>T:"              "transpose-characters()\n"
68 #ifndef OLDXAW
69 "c<Key>U:"              "multiply(Start)\n"
70 #else
71 "c<Key>U:"              "multiply(4)\n"
72 #endif
73 "c<Key>V:"              "next-page()\n"
74 "c<Key>W:"              "kill-selection()\n"
75 "c<Key>Y:"              "insert-selection(SECONDARY)\n"
76 "c<Key>Z:"              "scroll-one-line-up()\n"
77 "m<Key>B:"              "backward-word()\n"
78 "m<Key>C:"              "capitalize-word()\n"
79 "m<Key>F:"              "forward-word()\n"
80 "m<Key>I:"              "insert-file()\n"
81 "m<Key>K:"              "kill-to-end-of-paragraph()\n"
82 "m<Key>L:"              "downcase-word()\n"
83 "m<Key>Q:"              "form-paragraph()\n"
84 "m<Key>U:"              "upcase-word()\n"
85 "m<Key>V:"              "previous-page()\n"
86 #ifndef OLDXAW
87 "m<Key>Y:"              "kill-ring-yank()\n"
88 #endif
89 "m<Key>Z:"              "scroll-one-line-down()\n"
90 "~s m<Key>d:"           "kill-word(alnum)\n"
91 "s m<Key>d:"            "delete-next-word(alnum)\n"
92 "~s m<Key>h:"           "backward-kill-word(alnum)\n"
93 "s m<Key>h:"            "delete-previous-word(alnum)\n"
94 ":m<Key>\\<:"           "beginning-of-file()\n"
95 ":m<Key>\\>:"           "end-of-file()\n"
96 ":m<Key>]:"             "forward-paragraph()\n"
97 ":m<Key>[:"             "backward-paragraph()\n"
98 "~s m<Key>Delete:"      "backward-kill-word(alnum)\n"
99 "s m<Key>Delete:"       "delete-previous-word(alnum)\n"
100 "~s m<Key>BackSpace:"   "backward-kill-word(alnum)\n"
101 "s m<Key>BackSpace:"    "delete-previous-word(alnum)\n"
102 "c<Key>Left:"           "backward-word(alnum)\n"
103 "c<Key>Right:"          "forward-word(alnum)\n"
104 "c<Key>Up:"             "backward-paragraph()\n"
105 "c<Key>Down:"           "forward-paragraph()\n"
106 "<Key>Home:"            "beginning-of-file()\n"
107 ":<Key>KP_Home:"        "beginning-of-file()\n"
108 "<Key>End:"             "end-of-file()\n"
109 ":<Key>KP_End:"         "end-of-file()\n"
110 "<Key>Next:"            "next-page()\n"
111 ":<Key>KP_Next:"        "next-page()\n"
112 "<Key>Prior:"           "previous-page()\n"
113 ":<Key>KP_Prior:"       "previous-page()\n"
114 "<Key>Right:"           "forward-character()\n"
115 ":<Key>KP_Right:"       "forward-character()\n"
116 "<Key>Left:"            "backward-character()\n"
117 ":<Key>KP_Left:"        "backward-character()\n"
118 "<Key>Down:"            "next-line()\n"
119 ":<Key>KP_Down:"        "next-line()\n"
120 "<Key>Up:"              "previous-line()\n"
121 ":<Key>KP_Up:"          "previous-line()\n"
122 "<Key>Delete:"          "delete()\n"
123 ":<Key>KP_Delete:"      "delete()\n"
124 "<Key>BackSpace:"       "delete-previous-character()\n"
125 "<Key>Linefeed:"        "newline-and-indent()\n"
126 "<Key>Return:"          "newline()\n"
127 ":<Key>KP_Enter:"       "newline()\n"
128 "c<Key>backslash:"      "reconnect-im()\n"
129 "<Key>Kanji:"           "reconnect-im()\n"
130 #ifndef OLDXAW
131 ":<Key>0:"              "numeric(0)\n"
132 ":<Key>1:"              "numeric(1)\n"
133 ":<Key>2:"              "numeric(2)\n"
134 ":<Key>3:"              "numeric(3)\n"
135 ":<Key>4:"              "numeric(4)\n"
136 ":<Key>5:"              "numeric(5)\n"
137 ":<Key>6:"              "numeric(6)\n"
138 ":<Key>7:"              "numeric(7)\n"
139 ":<Key>8:"              "numeric(8)\n"
140 ":<Key>9:"              "numeric(9)\n"
141 ":<Key>-:"              "numeric(-)\n"
142 ":c<Key>_:"             "undo()\n"
143 #endif
144 "s <Key>Insert:"        "insert-selection(PRIMARY, CUT_BUFFER0)\n"
145 "<Ctrl>Q,<Key>:"        "insert-char()\n"
146 "<Key>:"                "insert-char()\n"
147 "<Enter>:"              "enter-window()\n"
148 "<Leave>:"              "leave-window()\n"
149 "<FocusIn>:"            "focus-in()\n"
150 "<FocusOut>:"           "focus-out()\n"
151 "<Btn1Down>:"           "select-start()\n"
152 "<Btn1Motion>:"         "extend-adjust()\n"
153 "<Btn1Up>:"             "extend-end(PRIMARY, CUT_BUFFER0)\n"
154 "<Btn2Down>:"           "insert-selection(PRIMARY, CUT_BUFFER0)\n"
155 "<Btn3Down>:"           "extend-start()\n"
156 "<Btn3Motion>:"         "extend-adjust()\n"
157 "<Btn3Up>:"             "extend-end(PRIMARY, CUT_BUFFER0)\n"
158 ;