Merge branch '2121_dir_symlink'
[kaloumi3.git] / src / cmddef.h
blobe25deb222f5ba3aa3ecbf5c478e4ff112ce8ebdb
2 /** \file
3 * \brief Header: editor constants
4 */
6 #ifndef MC_CMD_DEF_H
7 #define MC_CMD_DEF_H
9 /** \todo In the distant future, keyboards will be invented with a
10 * separate key for each one of these commands *sigh*
13 /* special commands */
14 #define CK_Insert_Char -1
15 #define CK_Ignore_Key 0
17 /* cursor movements */
18 #define CK_BackSpace 1
19 #define CK_Delete 2
20 #define CK_Enter 3
21 #define CK_Page_Up 4
22 #define CK_Page_Down 5
23 #define CK_Left 6
24 #define CK_Right 7
25 #define CK_Word_Left 8
26 #define CK_Word_Right 9
27 #define CK_Up 10
28 #define CK_Down 11
29 #define CK_Home 12
30 #define CK_End 13
31 #define CK_Tab 14
32 #define CK_Undo 15
33 #define CK_Beginning_Of_Text 16
34 #define CK_End_Of_Text 17
35 #define CK_Scroll_Up 18
36 #define CK_Scroll_Down 19
37 #define CK_Return 20
38 #define CK_Begin_Page 21
39 #define CK_End_Page 22
40 #define CK_Delete_Word_Left 23
41 #define CK_Delete_Word_Right 24
42 #define CK_Paragraph_Up 25
43 #define CK_Paragraph_Down 26
45 /* file commands */
46 #define CK_Save 101
47 #define CK_Load 102
48 #define CK_New 103
49 #define CK_Save_As 104
50 #define CK_Load_Prev_File 111
51 #define CK_Load_Next_File 112
52 #define CK_Load_Syntax_File 121
53 #define CK_Load_Menu_File 122
54 #define CK_Menu 123
56 /* block commands */
57 #define CK_Mark 201
58 #define CK_Copy 202
59 #define CK_Move 203
60 #define CK_Remove 204
61 #define CK_Unmark 206
62 #define CK_Save_Block 207
63 #define CK_Column_Mark 208
64 #define CK_Shift_Block_Left 211
65 #define CK_Shift_Block_Right 212
66 #define CK_Mark_All 213
68 /* search and replace */
69 #define CK_Find 301
70 #define CK_Find_Again 302
71 #define CK_Replace 303
72 #define CK_Replace_Again 304
73 #define CK_Complete_Word 305
75 #if 0
76 /* debugger commands */
77 #define CK_Debug_Start 350
78 #define CK_Debug_Stop 351
79 #define CK_Debug_Toggle_Break 352
80 #define CK_Debug_Clear 353
81 #define CK_Debug_Next 354
82 #define CK_Debug_Step 355
83 #define CK_Debug_Back_Trace 356
84 #define CK_Debug_Continue 357
85 #define CK_Debug_Enter_Command 358
86 #define CK_Debug_Until_Curser 359
87 #endif
89 /* misc */
90 #define CK_Insert_File 401
91 #define CK_Quit 402
92 #define CK_Toggle_Insert 403
93 #define CK_Help 404
94 #define CK_Date 405
95 #define CK_Refresh 406
96 #define CK_Goto 407
97 #define CK_Delete_Line 408
98 #define CK_Delete_To_Line_End 409
99 #define CK_Delete_To_Line_Begin 410
100 #define CK_Man_Page 411
101 #define CK_Sort 412
102 #define CK_Mail 413
103 #define CK_Cancel 414
104 #define CK_Complete 415
105 #define CK_Paragraph_Format 416
106 #define CK_Util 417
107 #define CK_Type_Load_Python 418
108 #define CK_Find_File 419
109 #define CK_Ctags 420
110 #define CK_Match_Bracket 421
111 #define CK_Terminal 422
112 #define CK_Terminal_App 423
113 #define CK_ExtCmd 424
114 #define CK_User_Menu 425
115 #define CK_Find_Definition 426
116 #define CK_Edit_Options 427
117 #define CK_Edit_Save_Mode 428
118 #define CK_Choose_Syntax 429
119 #define CK_About 430
121 #if 0
122 /* application control */
123 #define CK_Save_Desktop 451
124 #define CK_New_Window 452
125 #define CK_Cycle 453
126 #define CK_Save_And_Quit 455
127 #define CK_Run_Another 456
128 #define CK_Check_Save_And_Quit 457
129 #define CK_Maximize 458
130 #endif
132 #define CK_Toggle_Show_Margin 460
133 #define CK_Toggle_Tab_TWS 470
134 #define CK_Toggle_Syntax 480
135 #define CK_Toggle_Line_State 490
137 /* macro */
138 #define CK_Begin_Record_Macro 501
139 #define CK_End_Record_Macro 502
140 #define CK_Delete_Macro 503
142 /* book mark */
143 #define CK_Toggle_Bookmark 550
144 #define CK_Flush_Bookmarks 551
145 #define CK_Next_Bookmark 552
146 #define CK_Prev_Bookmark 553
148 /* highlight commands */
149 #define CK_Page_Up_Highlight 604
150 #define CK_Page_Down_Highlight 605
151 #define CK_Left_Highlight 606
152 #define CK_Right_Highlight 607
153 #define CK_Word_Left_Highlight 608
154 #define CK_Word_Right_Highlight 609
155 #define CK_Up_Highlight 610
156 #define CK_Down_Highlight 611
157 #define CK_Home_Highlight 612
158 #define CK_End_Highlight 613
159 #define CK_Beginning_Of_Text_Highlight 614
160 #define CK_End_Of_Text_Highlight 615
161 #define CK_Begin_Page_Highlight 616
162 #define CK_End_Page_Highlight 617
163 #define CK_Scroll_Up_Highlight 618
164 #define CK_Scroll_Down_Highlight 619
165 #define CK_Paragraph_Up_Highlight 620
166 #define CK_Paragraph_Down_Highlight 621
168 /* alt highlight commands */
169 #define CK_Page_Up_Alt_Highlight 654
170 #define CK_Page_Down_Alt_Highlight 655
171 #define CK_Left_Alt_Highlight 656
172 #define CK_Right_Alt_Highlight 657
173 #define CK_Word_Left_Alt_Highlight 658
174 #define CK_Word_Right_Alt_Highlight 659
175 #define CK_Up_Alt_Highlight 660
176 #define CK_Down_Alt_Highlight 661
177 #define CK_Home_Alt_Highlight 662
178 #define CK_End_Alt_Highlight 663
179 #define CK_Beginning_Of_Text_Alt_Highlight 664
180 #define CK_End_Of_Text_Alt_Highlight 665
181 #define CK_Begin_Page_Alt_Highlight 666
182 #define CK_End_Page_Alt_Highlight 667
183 #define CK_Scroll_Up_Alt_Highlight 668
184 #define CK_Scroll_Down_Alt_Highlight 669
185 #define CK_Paragraph_Up_Alt_Highlight 670
186 #define CK_Paragraph_Down_Alt_Highlight 671
188 /* X clipboard operations */
189 #define CK_XStore 701
190 #define CK_XCut 702
191 #define CK_XPaste 703
192 #define CK_Selection_History 704
194 #define CK_Shell 801
196 /* C-x or similar */
197 #define CK_Ext_Mode 820
199 #define CK_Insert_Literal 851
200 #define CK_Execute_Macro 852
201 #define CK_Begin_End_Macro 853
203 /* help */
204 #define CK_HelpHelp 1001
205 #define CK_HelpIndex 1002
206 #define CK_HelpBack 1003
207 #define CK_HelpQuit 1004
208 #define CK_HelpMoveUp 1005
209 #define CK_HelpMoveDown 1006
210 #define CK_HelpSelectLink 1007
211 #define CK_HelpNextLink 1008
212 #define CK_HelpPrevLink 1009
213 #define CK_HelpNextNode 1010
214 #define CK_HelpPrevNode 1011
216 /* common */
217 #define CK_ShowCommandLine 2001
218 #define CK_SelectCodepage 2002
219 #define CK_StartExtMap1 2021
220 #define CK_StartExtMap2 2022
222 /* text fields*/
223 #define CK_InputBol 4001
224 #define CK_InputEol 4002
225 #define CK_InputMoveLeft 4003
226 #define CK_InputWordLeft 4004
227 #define CK_InputBackwardChar 4005
228 #define CK_InputBackwardWord 4006
229 #define CK_InputMoveRight 4007
230 #define CK_InputWordRight 4008
231 #define CK_InputForwardChar 4009
232 #define CK_InputForwardWord 4010
233 #define CK_InputBackwardDelete 4011
234 #define CK_InputDeleteChar 4012
235 #define CK_InputKillWord 4013
236 #define CK_InputBackwardKillWord 4014
237 #define CK_InputSetMark 4015
238 #define CK_InputKillRegion 4016
239 #define CK_InputKillSave 4017
240 #define CK_InputYank 4018
241 #define CK_InputKillLine 4020
242 #define CK_InputHistoryPrev 4021
243 #define CK_InputHistoryNext 4022
244 #define CK_InputHistoryShow 4023
245 #define CK_InputComplete 4024
246 #define CK_InputPaste 4025
247 #define CK_InputClearLine 4026
249 /* Viewer */
250 #define CK_ViewHelp 5001
251 #define CK_ViewToggleWrapMode 5002
252 #define CK_ViewToggleHexEditMode 5003
253 #define CK_ViewToggleHexMode 5004
254 #define CK_ViewGoto 5005
255 #define CK_ViewHexEditSave 5006
256 #define CK_ViewSearch 5007
257 #define CK_ViewToggleMagicMode 5008
258 #define CK_ViewToggleNroffMode 5009
259 #define CK_ViewQuit 5010
260 #define CK_ViewContinueSearch 5011
261 #define CK_ViewGotoBookmark 5012
262 #define CK_ViewNewBookmark 5013
263 #define CK_ViewMoveUp 5014
264 #define CK_ViewMoveDown 5015
265 #define CK_ViewMoveLeft 5016
266 #define CK_ViewMoveRight 5017
267 #define CK_ViewMovePgDn 5018
268 #define CK_ViewMovePgUp 5019
269 #define CK_ViewMoveHalfPgDn 5020
270 #define CK_ViewMoveHalfPgUp 5021
271 #define CK_ViewMoveToBol 5022
272 #define CK_ViewMoveToEol 5023
273 #define CK_ViewNextFile 5024
274 #define CK_ViewPrevFile 5025
275 #define CK_ViewToggleRuler 5026
276 #define CK_ViewToggleHexNavMode 5027
278 /* Tree */
279 #define CK_TreeHelp 6001
280 #define CK_TreeForget 6003
281 #define CK_TreeToggleNav 6004
282 #define CK_TreeCopy 6005
283 #define CK_TreeMove 6006
284 #define CK_TreeMake 6007
285 #define CK_TreeMoveUp 6011
286 #define CK_TreeMoveDown 6012
287 #define CK_TreeMoveLeft 6013
288 #define CK_TreeMoveRight 6014
289 #define CK_TreeMoveHome 6015
290 #define CK_TreeMoveEnd 6016
291 #define CK_TreeMovePgUp 6017
292 #define CK_TreeMovePgDn 6018
293 #define CK_TreeOpen 6019
294 #define CK_TreeRescan 6020
295 #define CK_TreeStartSearch 6021
296 #define CK_TreeRemove 6022
298 /* main commands */
299 #define CK_AddHotlist 7001
300 #define CK_ChmodCmd 7002
301 #define CK_ChownAdvancedCmd 7003
302 #define CK_ChownCmd 7004
303 #define CK_CompareDirsCmd 7005
304 #define CK_ConfigureBox 7006
305 #define CK_ConfigureVfs 7007
306 #define CK_ConfirmBox 7008
307 #define CK_CopyCmd 7009
308 #define CK_CopyCurrentPathname 7010
309 #define CK_CopyCurrentReadlink 7011
310 #define CK_CopyCurrentTagged 7012
311 #define CK_CopyOtherPathname 7013
312 #define CK_CopyOtherReadlink 7014
313 #define CK_CopyOtherTagged 7015
314 #define CK_DeleteCmd 7016
315 #define CK_DirsizesCmd 7017
316 #define CK_DisplayBitsBox 7018
317 #define CK_EditCmd 7019
318 #define CK_EditExtFileCmd 7020
319 #define CK_EditFhlFileCmd 7021
320 #define CK_EditMcMenuCmd 7022
321 #define CK_EditSymlinkCmd 7023
322 #define CK_EditSyntaxCmd 7024
323 #define CK_EditUserMenuCmd 7025
324 #define CK_ExternalPanelize 7026
325 #define CK_FilterCmd 7027
326 #define CK_FilteredViewCmd 7028
327 #define CK_FindCmd 7029
328 #define CK_FishlinkCmd 7030
329 #define CK_FtplinkCmd 7031
330 #define CK_HistoryCmd 7032
331 #define CK_InfoCmd 7033
332 #define CK_JobsCmd 7034
333 #define CK_LayoutCmd 7035
334 #define CK_LearnKeys 7036
335 #define CK_LinkCmd 7037
336 #define CK_ListingCmd 7038
337 #define CK_ListmodeCmd 7039
338 #define CK_MenuLastSelectedCmd 7042
339 #define CK_MkdirCmd 7044
340 #define CK_NetlinkCmd 7045
341 #define CK_QuickCdCmd 7046
342 #define CK_QuickChdirCmd 7047
343 #define CK_QuickViewCmd 7048
344 #define CK_QuietQuitCmd 7049
345 #define CK_QuitCmd 7050
346 #define CK_RenameCmd 7051
347 #define CK_RereadCmd 7052
348 #define CK_ReselectVfs 7053
349 #define CK_ReverseSelectionCmd 7054
350 #define CK_SaveSetupCmd 7055
351 #define CK_SelectCmd 7056
352 #define CK_SingleDirsizeCmd 7057
353 #define CK_SmblinkCmd 7058
354 #define CK_SuspendCmd 7059
355 #define CK_SwapCmd 7060
356 #define CK_SymlinkCmd 7061
357 #define CK_ToggleListingCmd 7062
358 #define CK_ToggleShowHidden 7063
359 #define CK_TreeCmd 7064
360 #define CK_TreeBoxCmd 7065
361 #define CK_UndeleteCmd 7066
362 #define CK_UnselectCmd 7067
363 #define CK_UserFileMenuCmd 7068
364 #define CK_UserMenuCmd 7069
365 #define CK_ViewCmd 7070
366 #define CK_ViewFileCmd 7071
367 #define CK_HelpCmd 7072
368 #define CK_MenuCmd 7073
369 #define CK_TogglePanelsSplit 7074
371 /* panels */
372 #define CK_PanelChdirOtherPanel 8001
373 #define CK_PanelChdirToReadlink 8002
374 #define CK_PanelCmdCopyLocal 8003
375 #define CK_PanelCmdDeleteLocal 8004
376 #define CK_PanelCmdDoEnter 8005
377 #define CK_PanelCmdEditNew 8006
378 #define CK_PanelCmdRenameLocal 8007
379 #define CK_PanelCmdReverseSelection 8008
380 #define CK_PanelCmdSelect 8009
381 #define CK_PanelCmdUnselect 8010
382 #define CK_PanelCmdViewSimple 8011
383 #define CK_PanelCtrlNextPage 8012
384 #define CK_PanelCtrlPrevPage 8013
385 #define CK_PanelDirectoryHistoryList 8014
386 #define CK_PanelDirectoryHistoryNext 8015
387 #define CK_PanelDirectoryHistoryPrev 8016
388 #define CK_PanelGotoBottomFile 8017
389 #define CK_PanelGotoMiddleFile 8018
390 #define CK_PanelGotoTopFile 8019
391 #define CK_PanelMarkFile 8020
392 #define CK_PanelMoveDown 8021
393 #define CK_PanelMoveEnd 8022
394 #define CK_PanelMoveHome 8023
395 #define CK_PanelMoveUp 8024
396 #define CK_PanelMoveLeft 8025
397 #define CK_PanelMoveRight 8026
398 #define CK_PanelNextPage 8027
399 #define CK_PanelPrevPage 8028
400 #define CK_PanelSetPanelEncoding 8029
401 #define CK_PanelStartSearch 8030
402 #define CK_PanelSyncOtherPanel 8031
403 #define CK_PanelToggleSortOrderNext 8032
404 #define CK_PanelToggleSortOrderPrev 8033
405 #define CK_PanelSelectSortOrder 8034
406 #define CK_PanelReverseSort 8035
407 #define CK_PanelSortOrderByName 8036
408 #define CK_PanelSortOrderByExt 8037
409 #define CK_PanelSortOrderBySize 8038
410 #define CK_PanelSortOrderByMTime 8039
413 Process a block through a shell command: CK_Pipe_Block(i) executes shell_cmd[i].
414 shell_cmd[i] must process the file ~/cooledit.block and output ~/cooledit.block
415 which is then inserted into the text in place of the original block. shell_cmd[i] must
416 also produce a file homedir/cooledit.error . If this file is not empty an error will
417 have been assumed to have occured, and the block will not be replaced.
418 TODO: bring up a viewer to display the error message instead of inserting
419 it into the text, which is annoying.
421 #define CK_Pipe_Block(i) (1000+(i))
422 #define SHELL_COMMANDS_i {"/edit.indent.rc", "/edit.spell.rc", /* and so on */ 0 }
423 #define CK_Macro(i) (2000+(i))
424 #define CK_Last_Macro CK_Macro(0x7FFF)
425 #else
427 #define CK_User_Command(i) ((i) | (1 << 16))
428 #define IS_USER_COMMAND(i) ((i) & (1 << 16))
429 #define CK_Macro(i) ((i) | (1 << 17))
430 #define IS_MACRO_COMMAND(i) ((i) & (1 << 17))
432 #endif /* MC_CMD_DEF_H */