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