TextTr.c revision 7a84e134
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 46char _XawDefaultTextTranslations[] = 47"c<Key>A:" "beginning-of-line()\n" 48"c<Key>B:" "backward-character()\n" 49"c<Key>C:" "insert-selection(CUT_BUFFER0)\n" 50"c<Key>D:" "delete-next-character()\n" 51"c<Key>E:" "end-of-line()\n" 52"c<Key>F:" "forward-character()\n" 53#ifndef OLDXAW 54"c<Key>G:" "keyboard-reset()\n" 55#else 56"c<Key>G:" "multiply(Reset)\n" 57#endif 58"c<Key>H:" "delete-previous-character()\n" 59"c<Key>J:" "newline-and-indent()\n" 60"c<Key>K:" "kill-to-end-of-line()\n" 61"c<Key>L:" "redraw-display()\n" 62"c<Key>M:" "newline()\n" 63"c<Key>N:" "next-line()\n" 64"c<Key>O:" "newline-and-backup()\n" 65"c<Key>P:" "previous-line()\n" 66"c<Key>R:" "search(backward)\n" 67"c<Key>S:" "search(forward)\n" 68"c<Key>T:" "transpose-characters()\n" 69#ifndef OLDXAW 70"c<Key>U:" "multiply(Start)\n" 71#else 72"c<Key>U:" "multiply(4)\n" 73#endif 74"c<Key>V:" "next-page()\n" 75"c<Key>W:" "kill-selection()\n" 76"c<Key>Y:" "insert-selection(SECONDARY)\n" 77"c<Key>Z:" "scroll-one-line-up()\n" 78"m<Key>B:" "backward-word()\n" 79"m<Key>C:" "capitalize-word()\n" 80"m<Key>F:" "forward-word()\n" 81"m<Key>I:" "insert-file()\n" 82"m<Key>K:" "kill-to-end-of-paragraph()\n" 83"m<Key>L:" "downcase-word()\n" 84"m<Key>Q:" "form-paragraph()\n" 85"m<Key>U:" "upcase-word()\n" 86"m<Key>V:" "previous-page()\n" 87#ifndef OLDXAW 88"m<Key>Y:" "kill-ring-yank()\n" 89#endif 90"m<Key>Z:" "scroll-one-line-down()\n" 91"~s m<Key>d:" "kill-word(alnum)\n" 92"s m<Key>d:" "delete-next-word(alnum)\n" 93"~s m<Key>h:" "backward-kill-word(alnum)\n" 94"s m<Key>h:" "delete-previous-word(alnum)\n" 95":m<Key>\\<:" "beginning-of-file()\n" 96":m<Key>\\>:" "end-of-file()\n" 97":m<Key>]:" "forward-paragraph()\n" 98":m<Key>[:" "backward-paragraph()\n" 99"~s m<Key>Delete:" "backward-kill-word(alnum)\n" 100"s m<Key>Delete:" "delete-previous-word(alnum)\n" 101"~s m<Key>BackSpace:" "backward-kill-word(alnum)\n" 102"s m<Key>BackSpace:" "delete-previous-word(alnum)\n" 103"c<Key>Left:" "backward-word(alnum)\n" 104"c<Key>Right:" "forward-word(alnum)\n" 105"c<Key>Up:" "backward-paragraph()\n" 106"c<Key>Down:" "forward-paragraph()\n" 107"<Key>Home:" "beginning-of-file()\n" 108":<Key>KP_Home:" "beginning-of-file()\n" 109"<Key>End:" "end-of-file()\n" 110":<Key>KP_End:" "end-of-file()\n" 111"<Key>Next:" "next-page()\n" 112":<Key>KP_Next:" "next-page()\n" 113"<Key>Prior:" "previous-page()\n" 114":<Key>KP_Prior:" "previous-page()\n" 115"<Key>Right:" "forward-character()\n" 116":<Key>KP_Right:" "forward-character()\n" 117"<Key>Left:" "backward-character()\n" 118":<Key>KP_Left:" "backward-character()\n" 119"<Key>Down:" "next-line()\n" 120":<Key>KP_Down:" "next-line()\n" 121"<Key>Up:" "previous-line()\n" 122":<Key>KP_Up:" "previous-line()\n" 123"<Key>Delete:" "delete()\n" 124":<Key>KP_Delete:" "delete()\n" 125"<Key>BackSpace:" "delete-previous-character()\n" 126"<Key>Linefeed:" "newline-and-indent()\n" 127"<Key>Return:" "newline()\n" 128":<Key>KP_Enter:" "newline()\n" 129"c<Key>backslash:" "reconnect-im()\n" 130"<Key>Kanji:" "reconnect-im()\n" 131#ifndef OLDXAW 132":<Key>0:" "numeric(0)\n" 133":<Key>1:" "numeric(1)\n" 134":<Key>2:" "numeric(2)\n" 135":<Key>3:" "numeric(3)\n" 136":<Key>4:" "numeric(4)\n" 137":<Key>5:" "numeric(5)\n" 138":<Key>6:" "numeric(6)\n" 139":<Key>7:" "numeric(7)\n" 140":<Key>8:" "numeric(8)\n" 141":<Key>9:" "numeric(9)\n" 142":<Key>-:" "numeric(-)\n" 143":c<Key>_:" "undo()\n" 144#endif 145"s <Key>Insert:" "insert-selection(PRIMARY, CUT_BUFFER0)\n" 146"<Ctrl>Q,<Key>:" "insert-char()\n" 147"<Key>:" "insert-char()\n" 148"<Enter>:" "enter-window()\n" 149"<Leave>:" "leave-window()\n" 150"<FocusIn>:" "focus-in()\n" 151"<FocusOut>:" "focus-out()\n" 152"<Btn1Down>:" "select-start()\n" 153"<Btn1Motion>:" "extend-adjust()\n" 154"<Btn1Up>:" "extend-end(PRIMARY, CUT_BUFFER0)\n" 155"<Btn2Down>:" "insert-selection(PRIMARY, CUT_BUFFER0)\n" 156"<Btn3Down>:" "extend-start()\n" 157"<Btn3Motion>:" "extend-adjust()\n" 158"<Btn3Up>:" "extend-end(PRIMARY, CUT_BUFFER0)\n" 159; 160