TextTr.c revision 775e7de9
17a84e134Smrg/* $Xorg: TextTr.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */
27a84e134Smrg
37a84e134Smrg/*
47a84e134Smrg
57a84e134SmrgCopyright 1991, 1994, 1998  The Open Group
67a84e134Smrg
77a84e134SmrgPermission to use, copy, modify, distribute, and sell this software and its
87a84e134Smrgdocumentation for any purpose is hereby granted without fee, provided that
97a84e134Smrgthe above copyright notice appear in all copies and that both that
107a84e134Smrgcopyright notice and this permission notice appear in supporting
117a84e134Smrgdocumentation.
127a84e134Smrg
137a84e134SmrgThe above copyright notice and this permission notice shall be included in
147a84e134Smrgall copies or substantial portions of the Software.
157a84e134Smrg
167a84e134SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
177a84e134SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
187a84e134SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
197a84e134SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
207a84e134SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
217a84e134SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
227a84e134Smrg
237a84e134SmrgExcept as contained in this notice, the name of The Open Group shall not be
247a84e134Smrgused in advertising or otherwise to promote the sale, use or other dealings
257a84e134Smrgin this Software without prior written authorization from The Open Group.
267a84e134Smrg
277a84e134Smrg*/
287a84e134Smrg/* $XFree86: xc/lib/Xaw/TextTr.c,v 3.15 2001/01/17 19:42:35 dawes Exp $ */
297a84e134Smrg
307a84e134Smrg/* INTERNATIONALIZATION:
317a84e134Smrg
327a84e134SmrgThe OMRON R5 contrib added the following action to the old TextTr:
337a84e134Smrg
347a84e134Smrg	Ctrl<Key>backslash:	reconnect-im()
357a84e134Smrg
367a84e134SmrgThis is needed when the im is killed or otherwise becomes unreachable.
377a84e134SmrgThis keystroke is evil (inconvenient, hard-to-remember, not obvious)
387a84e134Smrgso I am adding one more translation:
397a84e134Smrg
407a84e134Smrg	<Key>Kanji:		reconnect-im()
417a84e134Smrg
427a84e134SmrgThe Japanese user typically hits their Kanji key when they want to do
437a84e134Smrginput.  This merely makes sure the input is connected.
447a84e134Smrg*/
457a84e134Smrg
46775e7de9Smrg#include <X11/Xaw/Text.h>
47775e7de9Smrg
487a84e134Smrgchar _XawDefaultTextTranslations[] =
497a84e134Smrg"c<Key>A:"		"beginning-of-line()\n"
507a84e134Smrg"c<Key>B:"		"backward-character()\n"
517a84e134Smrg"c<Key>C:"		"insert-selection(CUT_BUFFER0)\n"
527a84e134Smrg"c<Key>D:"		"delete-next-character()\n"
537a84e134Smrg"c<Key>E:"		"end-of-line()\n"
547a84e134Smrg"c<Key>F:"		"forward-character()\n"
557a84e134Smrg#ifndef OLDXAW
567a84e134Smrg"c<Key>G:"		"keyboard-reset()\n"
577a84e134Smrg#else
587a84e134Smrg"c<Key>G:"		"multiply(Reset)\n"
597a84e134Smrg#endif
607a84e134Smrg"c<Key>H:"		"delete-previous-character()\n"
617a84e134Smrg"c<Key>J:"		"newline-and-indent()\n"
627a84e134Smrg"c<Key>K:"		"kill-to-end-of-line()\n"
637a84e134Smrg"c<Key>L:"		"redraw-display()\n"
647a84e134Smrg"c<Key>M:"		"newline()\n"
657a84e134Smrg"c<Key>N:"		"next-line()\n"
667a84e134Smrg"c<Key>O:"		"newline-and-backup()\n"
677a84e134Smrg"c<Key>P:"		"previous-line()\n"
687a84e134Smrg"c<Key>R:"		"search(backward)\n"
697a84e134Smrg"c<Key>S:"		"search(forward)\n"
707a84e134Smrg"c<Key>T:"		"transpose-characters()\n"
717a84e134Smrg#ifndef OLDXAW
727a84e134Smrg"c<Key>U:"		"multiply(Start)\n"
737a84e134Smrg#else
747a84e134Smrg"c<Key>U:"		"multiply(4)\n"
757a84e134Smrg#endif
767a84e134Smrg"c<Key>V:"		"next-page()\n"
777a84e134Smrg"c<Key>W:"		"kill-selection()\n"
787a84e134Smrg"c<Key>Y:"		"insert-selection(SECONDARY)\n"
797a84e134Smrg"c<Key>Z:"		"scroll-one-line-up()\n"
807a84e134Smrg"m<Key>B:"		"backward-word()\n"
817a84e134Smrg"m<Key>C:"		"capitalize-word()\n"
827a84e134Smrg"m<Key>F:"		"forward-word()\n"
837a84e134Smrg"m<Key>I:"		"insert-file()\n"
847a84e134Smrg"m<Key>K:"		"kill-to-end-of-paragraph()\n"
857a84e134Smrg"m<Key>L:"		"downcase-word()\n"
867a84e134Smrg"m<Key>Q:"		"form-paragraph()\n"
877a84e134Smrg"m<Key>U:"		"upcase-word()\n"
887a84e134Smrg"m<Key>V:"		"previous-page()\n"
897a84e134Smrg#ifndef OLDXAW
907a84e134Smrg"m<Key>Y:"		"kill-ring-yank()\n"
917a84e134Smrg#endif
927a84e134Smrg"m<Key>Z:"		"scroll-one-line-down()\n"
937a84e134Smrg"~s m<Key>d:"		"kill-word(alnum)\n"
947a84e134Smrg"s m<Key>d:"		"delete-next-word(alnum)\n"
957a84e134Smrg"~s m<Key>h:"		"backward-kill-word(alnum)\n"
967a84e134Smrg"s m<Key>h:"		"delete-previous-word(alnum)\n"
977a84e134Smrg":m<Key>\\<:"		"beginning-of-file()\n"
987a84e134Smrg":m<Key>\\>:"		"end-of-file()\n"
997a84e134Smrg":m<Key>]:"		"forward-paragraph()\n"
1007a84e134Smrg":m<Key>[:"		"backward-paragraph()\n"
1017a84e134Smrg"~s m<Key>Delete:"	"backward-kill-word(alnum)\n"
1027a84e134Smrg"s m<Key>Delete:"	"delete-previous-word(alnum)\n"
1037a84e134Smrg"~s m<Key>BackSpace:"	"backward-kill-word(alnum)\n"
1047a84e134Smrg"s m<Key>BackSpace:"	"delete-previous-word(alnum)\n"
1057a84e134Smrg"c<Key>Left:"		"backward-word(alnum)\n"
1067a84e134Smrg"c<Key>Right:"		"forward-word(alnum)\n"
1077a84e134Smrg"c<Key>Up:"		"backward-paragraph()\n"
1087a84e134Smrg"c<Key>Down:"		"forward-paragraph()\n"
1097a84e134Smrg"<Key>Home:"		"beginning-of-file()\n"
1107a84e134Smrg":<Key>KP_Home:"	"beginning-of-file()\n"
1117a84e134Smrg"<Key>End:"		"end-of-file()\n"
1127a84e134Smrg":<Key>KP_End:"		"end-of-file()\n"
1137a84e134Smrg"<Key>Next:"		"next-page()\n"
1147a84e134Smrg":<Key>KP_Next:"	"next-page()\n"
1157a84e134Smrg"<Key>Prior:"		"previous-page()\n"
1167a84e134Smrg":<Key>KP_Prior:"	"previous-page()\n"
1177a84e134Smrg"<Key>Right:"		"forward-character()\n"
1187a84e134Smrg":<Key>KP_Right:"	"forward-character()\n"
1197a84e134Smrg"<Key>Left:"		"backward-character()\n"
1207a84e134Smrg":<Key>KP_Left:"	"backward-character()\n"
1217a84e134Smrg"<Key>Down:"		"next-line()\n"
1227a84e134Smrg":<Key>KP_Down:"	"next-line()\n"
1237a84e134Smrg"<Key>Up:"		"previous-line()\n"
1247a84e134Smrg":<Key>KP_Up:"		"previous-line()\n"
1257a84e134Smrg"<Key>Delete:"		"delete()\n"
1267a84e134Smrg":<Key>KP_Delete:"	"delete()\n"
1277a84e134Smrg"<Key>BackSpace:"	"delete-previous-character()\n"
1287a84e134Smrg"<Key>Linefeed:"	"newline-and-indent()\n"
1297a84e134Smrg"<Key>Return:"		"newline()\n"
1307a84e134Smrg":<Key>KP_Enter:"	"newline()\n"
1317a84e134Smrg"c<Key>backslash:"	"reconnect-im()\n"
1327a84e134Smrg"<Key>Kanji:"		"reconnect-im()\n"
1337a84e134Smrg#ifndef OLDXAW
1347a84e134Smrg":<Key>0:"		"numeric(0)\n"
1357a84e134Smrg":<Key>1:"		"numeric(1)\n"
1367a84e134Smrg":<Key>2:"		"numeric(2)\n"
1377a84e134Smrg":<Key>3:"		"numeric(3)\n"
1387a84e134Smrg":<Key>4:"		"numeric(4)\n"
1397a84e134Smrg":<Key>5:"		"numeric(5)\n"
1407a84e134Smrg":<Key>6:"		"numeric(6)\n"
1417a84e134Smrg":<Key>7:"		"numeric(7)\n"
1427a84e134Smrg":<Key>8:"		"numeric(8)\n"
1437a84e134Smrg":<Key>9:"		"numeric(9)\n"
1447a84e134Smrg":<Key>-:"		"numeric(-)\n"
1457a84e134Smrg":c<Key>_:"		"undo()\n"
1467a84e134Smrg#endif
1477a84e134Smrg"s <Key>Insert:"	"insert-selection(PRIMARY, CUT_BUFFER0)\n"
1487a84e134Smrg"<Ctrl>Q,<Key>:"	"insert-char()\n"
1497a84e134Smrg"<Key>:"		"insert-char()\n"
1507a84e134Smrg"<Enter>:"		"enter-window()\n"
1517a84e134Smrg"<Leave>:"		"leave-window()\n"
1527a84e134Smrg"<FocusIn>:"		"focus-in()\n"
1537a84e134Smrg"<FocusOut>:"		"focus-out()\n"
1547a84e134Smrg"<Btn1Down>:"		"select-start()\n"
1557a84e134Smrg"<Btn1Motion>:"		"extend-adjust()\n"
1567a84e134Smrg"<Btn1Up>:"		"extend-end(PRIMARY, CUT_BUFFER0)\n"
1577a84e134Smrg"<Btn2Down>:"		"insert-selection(PRIMARY, CUT_BUFFER0)\n"
1587a84e134Smrg"<Btn3Down>:"		"extend-start()\n"
1597a84e134Smrg"<Btn3Motion>:"		"extend-adjust()\n"
1607a84e134Smrg"<Btn3Up>:"		"extend-end(PRIMARY, CUT_BUFFER0)\n"
1617a84e134Smrg;
162