1 #ifndef MC_EDIT_CMD_DEF_H
2 #define MC_EDIT_CMD_DEF_H
4 /* in the distant future, keyboards will be invented with a
5 separate key for each one of these commands *sigh* */
8 #define CK_Insert_Char -1
9 #define CK_Ignore_Key 0
11 /* cursor movements */
12 #define CK_BackSpace 1
16 #define CK_Page_Down 5
19 #define CK_Word_Left 8
20 #define CK_Word_Right 9
27 #define CK_Beginning_Of_Text 16
28 #define CK_End_Of_Text 17
29 #define CK_Scroll_Up 18
30 #define CK_Scroll_Down 19
32 #define CK_Begin_Page 21
33 #define CK_End_Page 22
34 #define CK_Delete_Word_Left 23
35 #define CK_Delete_Word_Right 24
36 #define CK_Paragraph_Up 25
37 #define CK_Paragraph_Down 26
44 #define CK_Save_As 104
45 #define CK_Load_Prev_File 111
46 #define CK_Load_Next_File 112
54 #define CK_Save_Block 207
55 #define CK_Column_Mark 208
57 /* search and replace */
59 #define CK_Find_Again 302
60 #define CK_Replace 303
61 #define CK_Replace_Again 304
62 #define CK_Complete_Word 305
64 /* debugger commands */
65 #define CK_Debug_Start 350
66 #define CK_Debug_Stop 351
67 #define CK_Debug_Toggle_Break 352
68 #define CK_Debug_Clear 353
69 #define CK_Debug_Next 354
70 #define CK_Debug_Step 355
71 #define CK_Debug_Back_Trace 356
72 #define CK_Debug_Continue 357
73 #define CK_Debug_Enter_Command 358
74 #define CK_Debug_Until_Curser 359
77 #define CK_Insert_File 401
79 #define CK_Toggle_Insert 403
82 #define CK_Refresh 406
84 #define CK_Delete_Line 408
85 #define CK_Delete_To_Line_End 409
86 #define CK_Delete_To_Line_Begin 410
87 #define CK_Man_Page 411
91 #define CK_Complete 415
92 #define CK_Paragraph_Format 416
94 #define CK_Type_Load_Python 418
95 #define CK_Find_File 419
97 #define CK_Match_Bracket 421
98 #define CK_Terminal 422
99 #define CK_Terminal_App 423
100 #define CK_ExtCmd 424
101 #define CK_User_Menu 425
102 #define CK_Find_Definition 426
104 /* application control */
105 #define CK_Save_Desktop 451
106 #define CK_New_Window 452
109 #define CK_Save_And_Quit 455
110 #define CK_Run_Another 456
111 #define CK_Check_Save_And_Quit 457
112 #define CK_Maximize 458
114 #define CK_Toggle_Syntax 480
117 #define CK_Begin_Record_Macro 501
118 #define CK_End_Record_Macro 502
119 #define CK_Delete_Macro 503
122 #define CK_Toggle_Bookmark 550
123 #define CK_Flush_Bookmarks 551
124 #define CK_Next_Bookmark 552
125 #define CK_Prev_Bookmark 553
127 /* highlight commands */
128 #define CK_Page_Up_Highlight 604
129 #define CK_Page_Down_Highlight 605
130 #define CK_Left_Highlight 606
131 #define CK_Right_Highlight 607
132 #define CK_Word_Left_Highlight 608
133 #define CK_Word_Right_Highlight 609
134 #define CK_Up_Highlight 610
135 #define CK_Down_Highlight 611
136 #define CK_Home_Highlight 612
137 #define CK_End_Highlight 613
138 #define CK_Beginning_Of_Text_Highlight 614
139 #define CK_End_Of_Text_Highlight 615
140 #define CK_Begin_Page_Highlight 616
141 #define CK_End_Page_Highlight 617
142 #define CK_Scroll_Up_Highlight 618
143 #define CK_Scroll_Down_Highlight 619
144 #define CK_Paragraph_Up_Highlight 620
145 #define CK_Paragraph_Down_Highlight 621
148 /* X clipboard operations */
149 #define CK_XStore 701
151 #define CK_XPaste 703
152 #define CK_Selection_History 704
158 #define CK_Ext_Mode 820
161 #define CK_Select_Codepage 850
162 #define CK_Insert_Literal 851
163 #define CK_Execute_Macro 852
164 #define CK_Begin_End_Macro 853
167 Process a block through a shell command: CK_Pipe_Block(i) executes shell_cmd[i].
168 shell_cmd[i] must process the file ~/cooledit.block and output ~/cooledit.block
169 which is then inserted into the text in place of the original block. shell_cmd[i] must
170 also produce a file homedir/cooledit.error . If this file is not empty an error will
171 have been assumed to have occured, and the block will not be replaced.
172 TODO: bring up a viewer to display the error message instead of inserting
173 it into the text, which is annoying.
175 #define CK_Pipe_Block(i) (1000+(i))
176 #define SHELL_COMMANDS_i {"/edit.indent.rc", "/edit.spell.rc", /* and so on */ 0 }
177 #define CK_Macro(i) (2000+(i))
178 #define CK_Last_Macro CK_Macro(0x7FFF)
181 #define CK_User_Command(i) ((i) | (1 << 16))
182 #define IS_USER_COMMAND(i) ((i) & (1 << 16))
183 #define CK_Macro(i) ((i) | (1 << 17))
184 #define IS_MACRO_COMMAND(i) ((i) & (1 << 17))