📄 text.c
字号:
"Ctrl<KeyPress>osfUp: backward_paragraph()\n" "Shift<KeyPress>osfUp: process_shift_up()\n" "~Alt~Shift~Ctrl~Meta<KeyPress>osfUp: process_up()\n" /* Down */ "Alt Shift Ctrl<KeyPress>osfDown: forward_paragraph(\"extend\", \"rect\")\n" "Meta Shift Ctrl<KeyPress>osfDown: forward_paragraph(\"extend\", \"rect\")\n" "Alt Shift<KeyPress>osfDown: process_shift_down(\"rect\")\n" "Meta Shift<KeyPress>osfDown: process_shift_down(\"rect\")\n" "Shift Ctrl<KeyPress>osfDown: forward_paragraph(\"extend\")\n" "Ctrl<KeyPress>osfDown: forward_paragraph()\n" "Shift<KeyPress>osfDown: process_shift_down()\n" "~Alt~Shift~Ctrl~Meta<KeyPress>osfDown: process_down()\n" /* PageUp */ "Alt Shift Ctrl<KeyPress>osfPageUp: page_left(\"extend\", \"rect\")\n" "Meta Shift Ctrl<KeyPress>osfPageUp: page_left(\"extend\", \"rect\")\n" "Alt Shift<KeyPress>osfPageUp: previous_page(\"extend\", \"rect\")\n" "Meta Shift<KeyPress>osfPageUp: previous_page(\"extend\", \"rect\")\n" "Shift Ctrl<KeyPress>osfPageUp: page_left(\"extend\")\n" "Ctrl<KeyPress>osfPageUp: page_left()\n" "Shift<KeyPress>osfPageUp: previous_page(\"extend\")\n" "~Alt ~Shift ~Ctrl ~Meta<KeyPress>osfPageUp: previous_page()\n" /* PageDown */ "Alt Shift Ctrl<KeyPress>osfPageDown: page_right(\"extend\", \"rect\")\n" "Meta Shift Ctrl<KeyPress>osfPageDown: page_right(\"extend\", \"rect\")\n" "Alt Shift<KeyPress>osfPageDown: next_page(\"extend\", \"rect\")\n" "Meta Shift<KeyPress>osfPageDown: next_page(\"extend\", \"rect\")\n" "Shift Ctrl<KeyPress>osfPageDown: page_right(\"extend\")\n" "Ctrl<KeyPress>osfPageDown: page_right()\n" "Shift<KeyPress>osfPageDown: next_page(\"extend\")\n" "~Alt ~Shift ~Ctrl ~Meta<KeyPress>osfPageDown: next_page()\n" /* PageLeft and PageRight are placed later than the PageUp/PageDown bindings. Some systems map osfPageLeft to Ctrl-PageUp. Overloading this single key gives problems, and we want to give priority to the normal version. */ /* PageLeft */ "Alt Shift<KeyPress>osfPageLeft: page_left(\"extend\", \"rect\")\n" "Meta Shift<KeyPress>osfPageLeft: page_left(\"extend\", \"rect\")\n" "Shift<KeyPress>osfPageLeft: page_left(\"extend\")\n" "~Alt ~Shift ~Ctrl ~Meta<KeyPress>osfPageLeft: page_left()\n" /* PageRight */ "Alt Shift<KeyPress>osfPageRight: page_right(\"extend\", \"rect\")\n" "Meta Shift<KeyPress>osfPageRight: page_right(\"extend\", \"rect\")\n" "Shift<KeyPress>osfPageRight: page_right(\"extend\")\n" "~Alt ~Shift ~Ctrl ~Meta<KeyPress>osfPageRight: page_right()\n" "Shift<KeyPress>osfSelect: key_select()\n" "<KeyPress>osfCancel: process_cancel()\n" "Ctrl~Alt~Meta<KeyPress>v: paste_clipboard()\n" "Ctrl~Alt~Meta<KeyPress>c: copy_clipboard()\n" "Ctrl~Alt~Meta<KeyPress>x: cut_clipboard()\n" "Ctrl~Alt~Meta<KeyPress>u: delete_to_start_of_line()\n" "Ctrl<KeyPress>Return: newline_and_indent()\n" "Shift<KeyPress>Return: newline_no_indent()\n" "<KeyPress>Return: newline()\n" /* KP_Enter = osfActivate Note: Ctrl+KP_Enter is already bound to Execute Command Line... */ "Shift<KeyPress>osfActivate: newline_no_indent()\n" "<KeyPress>osfActivate: newline()\n" "Ctrl<KeyPress>Tab: self_insert()\n" "<KeyPress>Tab: process_tab()\n" "Alt Shift Ctrl<KeyPress>space: key_select(\"rect\")\n" "Meta Shift Ctrl<KeyPress>space: key_select(\"rect\")\n" "Shift Ctrl~Meta~Alt<KeyPress>space: key_select()\n" "Ctrl~Meta~Alt<KeyPress>slash: select_all()\n" "Ctrl~Meta~Alt<KeyPress>backslash: deselect_all()\n" "<KeyPress>: self_insert()\n" "Alt Ctrl<Btn1Down>: move_destination()\n" "Meta Ctrl<Btn1Down>: move_destination()\n" "Shift Ctrl<Btn1Down>: extend_start(\"rect\")\n" "Shift<Btn1Down>: extend_start()\n" "<Btn1Down>: grab_focus()\n" "Button1 Ctrl<MotionNotify>: extend_adjust(\"rect\")\n" "Button1~Ctrl<MotionNotify>: extend_adjust()\n" "<Btn1Up>: extend_end()\n" "<Btn2Down>: secondary_or_drag_start()\n" "Shift Ctrl Button2<MotionNotify>: secondary_or_drag_adjust(\"rect\", \"copy\", \"overlay\")\n" "Shift Button2<MotionNotify>: secondary_or_drag_adjust(\"copy\")\n" "Ctrl Button2<MotionNotify>: secondary_or_drag_adjust(\"rect\", \"overlay\")\n" "Button2<MotionNotify>: secondary_or_drag_adjust()\n" "Shift Ctrl<Btn2Up>: move_to_or_end_drag(\"copy\", \"overlay\")\n" "Shift <Btn2Up>: move_to_or_end_drag(\"copy\")\n" "Alt<Btn2Up>: exchange()\n" "Meta<Btn2Up>: exchange()\n" "Ctrl<Btn2Up>: copy_to_or_end_drag(\"overlay\")\n" "<Btn2Up>: copy_to_or_end_drag()\n" "Ctrl~Meta~Alt<Btn3Down>: mouse_pan()\n" "Ctrl~Meta~Alt Button3<MotionNotify>: mouse_pan()\n" "<Btn3Up>: end_drag()\n" "<FocusIn>: focusIn()\n" "<FocusOut>: focusOut()\n" /* Support for mouse wheel in XFree86 */ "Shift<Btn4Down>,<Btn4Up>: scroll_up(1)\n" "Shift<Btn5Down>,<Btn5Up>: scroll_down(1)\n" "Ctrl<Btn4Down>,<Btn4Up>: previous_page()\n" "Ctrl<Btn5Down>,<Btn5Up>: next_page(1)\n" "<Btn4Down>,<Btn4Up>: scroll_up(5)\n" "<Btn5Down>,<Btn5Up>: scroll_down(5)\n"; /* some of the translations from the Motif text widget were not picked up: :<KeyPress>osfSelect: set-anchor()\n\ :<KeyPress>osfActivate: activate()\n\ ~Shift Ctrl~Meta~Alt<KeyPress>Return: activate()\n\ ~Shift Ctrl~Meta~Alt<KeyPress>space: set-anchor()\n\ :<KeyPress>osfClear: clear-selection()\n\ ~Shift~Ctrl~Meta~Alt<KeyPress>Return: process-return()\n\ Shift~Meta~Alt<KeyPress>Tab: prev-tab-group()\n\ Ctrl~Meta~Alt<KeyPress>Tab: next-tab-group()\n\ <UnmapNotify>: unmap()\n\ <EnterNotify>: enter()\n\ <LeaveNotify>: leave()\n */static XtActionsRec actionsList[] = { {"self-insert", selfInsertAP}, {"self_insert", selfInsertAP}, {"grab-focus", grabFocusAP}, {"grab_focus", grabFocusAP}, {"extend-adjust", extendAdjustAP}, {"extend_adjust", extendAdjustAP}, {"extend-start", extendStartAP}, {"extend_start", extendStartAP}, {"extend-end", extendEndAP}, {"extend_end", extendEndAP}, {"secondary-adjust", secondaryAdjustAP}, {"secondary_adjust", secondaryAdjustAP}, {"secondary-or-drag-adjust", secondaryOrDragAdjustAP}, {"secondary_or_drag_adjust", secondaryOrDragAdjustAP}, {"secondary-start", secondaryStartAP}, {"secondary_start", secondaryStartAP}, {"secondary-or-drag-start", secondaryOrDragStartAP}, {"secondary_or_drag_start", secondaryOrDragStartAP}, {"process-bdrag", secondaryOrDragStartAP}, {"process_bdrag", secondaryOrDragStartAP}, {"move-destination", moveDestinationAP}, {"move_destination", moveDestinationAP}, {"move-to", moveToAP}, {"move_to", moveToAP}, {"move-to-or-end-drag", moveToOrEndDragAP}, {"move_to_or_end_drag", moveToOrEndDragAP}, {"end_drag", endDragAP}, {"copy-to", copyToAP}, {"copy_to", copyToAP}, {"copy-to-or-end-drag", copyToOrEndDragAP}, {"copy_to_or_end_drag", copyToOrEndDragAP}, {"exchange", exchangeAP}, {"process-cancel", processCancelAP}, {"process_cancel", processCancelAP}, {"paste-clipboard", pasteClipboardAP}, {"paste_clipboard", pasteClipboardAP}, {"copy-clipboard", copyClipboardAP}, {"copy_clipboard", copyClipboardAP}, {"cut-clipboard", cutClipboardAP}, {"cut_clipboard", cutClipboardAP}, {"copy-primary", copyPrimaryAP}, {"copy_primary", copyPrimaryAP}, {"cut-primary", cutPrimaryAP}, {"cut_primary", cutPrimaryAP}, {"newline", newlineAP}, {"newline-and-indent", newlineAndIndentAP}, {"newline_and_indent", newlineAndIndentAP}, {"newline-no-indent", newlineNoIndentAP}, {"newline_no_indent", newlineNoIndentAP}, {"delete-selection", deleteSelectionAP}, {"delete_selection", deleteSelectionAP}, {"delete-previous-character", deletePreviousCharacterAP}, {"delete_previous_character", deletePreviousCharacterAP}, {"delete-next-character", deleteNextCharacterAP}, {"delete_next_character", deleteNextCharacterAP}, {"delete-previous-word", deletePreviousWordAP}, {"delete_previous_word", deletePreviousWordAP}, {"delete-next-word", deleteNextWordAP}, {"delete_next_word", deleteNextWordAP}, {"delete-to-start-of-line", deleteToStartOfLineAP}, {"delete_to_start_of_line", deleteToStartOfLineAP}, {"delete-to-end-of-line", deleteToEndOfLineAP}, {"delete_to_end_of_line", deleteToEndOfLineAP}, {"forward-character", forwardCharacterAP}, {"forward_character", forwardCharacterAP}, {"backward-character", backwardCharacterAP}, {"backward_character", backwardCharacterAP}, {"key-select", keySelectAP}, {"key_select", keySelectAP}, {"process-up", processUpAP}, {"process_up", processUpAP}, {"process-down", processDownAP}, {"process_down", processDownAP}, {"process-shift-up", processShiftUpAP}, {"process_shift_up", processShiftUpAP}, {"process-shift-down", processShiftDownAP}, {"process_shift_down", processShiftDownAP}, {"process-home", beginningOfLineAP}, {"process_home", beginningOfLineAP}, {"forward-word", forwardWordAP}, {"forward_word", forwardWordAP}, {"backward-word", backwardWordAP}, {"backward_word", backwardWordAP}, {"forward-paragraph", forwardParagraphAP}, {"forward_paragraph", forwardParagraphAP}, {"backward-paragraph", backwardParagraphAP}, {"backward_paragraph", backwardParagraphAP}, {"beginning-of-line", beginningOfLineAP}, {"beginning_of_line", beginningOfLineAP}, {"end-of-line", endOfLineAP}, {"end_of_line", endOfLineAP}, {"beginning-of-file", beginningOfFileAP}, {"beginning_of_file", beginningOfFileAP}, {"end-of-file", endOfFileAP}, {"end_of_file", endOfFileAP}, {"next-page", nextPageAP}, {"next_page", nextPageAP}, {"previous-page", previousPageAP}, {"previous_page", previousPageAP}, {"page-left", pageLeftAP}, {"page_left", pageLeftAP}, {"page-right", pageRightAP}, {"page_right", pageRightAP}, {"toggle-overstrike", toggleOverstrikeAP}, {"toggle_overstrike", toggleOverstrikeAP}, {"scroll-up", scrollUpAP}, {"scroll_up", scrollUpAP}, {"scroll-down", scrollDownAP}, {"scroll_down", scrollDownAP}, {"scroll_left", scrollLeftAP}, {"scroll_right", scrollRightAP}, {"scroll-to-line", scrollToLineAP}, {"scroll_to_line", scrollToLineAP}, {"select-all", selectAllAP}, {"select_all", selectAllAP}, {"deselect-all", deselectAllAP}, {"deselect_all", deselectAllAP}, {"focusIn", focusInAP}, {"focusOut", focusOutAP}, {"process-return", selfInsertAP}, {"process_return", selfInsertAP}, {"process-tab", processTabAP}, {"process_tab", processTabAP}, {"insert-string", insertStringAP}, {"insert_string", insertStringAP}, {"mouse_pan", mousePanAP},};/* The motif text widget defined a bunch of actions which the nedit text widget as-of-yet does not support: Actions which were not bound to keys (for emacs emulation, some of them should probably be supported: kill-next-character() kill-next-word() kill-previous-character() kill-previous-word() kill-selection() kill-to-end-of-line() kill-to-start-of-line() unkill() next-line() newline-and-backup() beep() redraw-display() scroll-one-line-down() scroll-one-line-up() set-insertion-point() Actions which are not particularly useful: set-anchor() activate() clear-selection() -> this is a wierd one do-quick-action() -> don't think this ever worked Help() next-tab-group() select-adjust() select-start() select-end()*/static XtResource resources[] = { {XmNhighlightThickness, XmCHighlightThickness, XmRDimension, sizeof(Dimension), XtOffset(TextWidget, primitive.highlight_thickness), XmRInt, 0}, {XmNshadowThickness, XmCShadowThickness, XmRDimension, sizeof(Dimension), XtOffset(TextWidget, primitive.shadow_thickness), XmRInt, 0}, {textNfont, textCFont, XmRFontStruct, sizeof(XFontStruct *), XtOffset(TextWidget, text.fontStruct), XmRString, "fixed"}, {textNselectForeground, textCSelectForeground, XmRPixel, sizeof(Pixel), XtOffset(TextWidget, text.selectFGPixel), XmRString, NEDIT_DEFAULT_SEL_FG}, {textNselectBackground, textCSelectBackground, XmRPixel, sizeof(Pixel), XtOffset(TextWidget, text.selectBGPixel), XmRString, NEDIT_DEFAULT_SEL_BG}, {textNhighlightForeground, textCHighlightForeground, XmRPixel,sizeof(Pixel), XtOffset(TextWidget, text.highlightFGPixel), XmRString, NEDIT_DEFAULT_HI_FG}, {textNhighlightBackground, textCHighlightBackground, XmRPixel,sizeof(Pixel), XtOffset(TextWidget, text.highlightBGPixel), XmRString, NEDIT_DEFAULT_HI_BG}, {textNlineNumForeground, textCLineNumForeground, XmRPixel,sizeof(Pixel), XtOffset(TextWidget, text.lineNumFGPixel), XmRString, NEDIT_DEFAULT_LINENO_FG}, {textNcursorForeground, textCCursorForeground, XmRPixel,sizeof(Pixel), XtOffset(TextWidget, text.cursorFGPixel), XmRString, NEDIT_DEFAULT_CURSOR_FG}, {textNcalltipForeground, textCcalltipForeground, XmRPixel,sizeof(Pixel), XtOffset(TextWidget, text.calltipFGPixel), XmRString, NEDIT_DEFAULT_CALLTIP_FG}, {textNcalltipBackground, textCcalltipBackground, XmRPixel,sizeof(Pixel), XtOffset(TextWidget, text.calltipBGPixel), XmRString, NEDIT_DEFAULT_CALLTIP_BG}, {textNbacklightCharTypes,textCBacklightCharTypes,XmRString,sizeof(XmString), XtOffset(TextWidget, text.backlightCharTypes), XmRString, NULL}, {textNrows, textCRows, XmRInt,sizeof(int), XtOffset(TextWidget, text.rows), XmRString, "24"}, {textNcolumns, textCColumns, XmRInt, sizeof(int), XtOffset(TextWidget, text.columns), XmRString, "80"}, {textNmarginWidth, textCMarginWidth, XmRInt, sizeof(int), XtOffset(TextWidget, text.marginWidth), XmRString, "5"}, {textNmarginHeight, textCMarginHeight, XmRInt, sizeof(int), XtOffset(TextWidget, text.marginHeight), XmRString, "5"}, {textNpendingDelete, textCPendingDelete, XmRBoolean, sizeof(Boolean),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -