initial step to do mark in inpun fields
[midnight-commander/osp/pkrayzel.git] / src / cmddef.h
blob4e74fbb9839c99a91e589b7ba1f1cc7441254b7d
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 /* Dialog */
223 #define CK_DialogOK 3001
224 #define CK_DialogCancel 3002
225 #define CK_DialogPrevItem 3003
226 #define CK_DialogNextItem 3004
227 #define CK_DialogHelp 3005
228 #define CK_DialogSuspend 3006
229 #define CK_DialogRefresh 3007
231 /* text fields*/
232 #define CK_InputBol 4001
233 #define CK_InputEol 4002
234 #define CK_InputMoveLeft 4003
235 #define CK_InputWordLeft 4004
236 #define CK_InputBackwardChar 4005
237 #define CK_InputBackwardWord 4006
238 #define CK_InputMoveRight 4007
239 #define CK_InputWordRight 4008
240 #define CK_InputForwardChar 4009
241 #define CK_InputForwardWord 4010
242 #define CK_InputBackwardDelete 4011
243 #define CK_InputDeleteChar 4012
244 #define CK_InputKillWord 4013
245 #define CK_InputBackwardKillWord 4014
246 #define CK_InputSetMark 4015
247 #define CK_InputKillRegion 4016
248 #define CK_InputKillSave 4017
249 #define CK_InputYank 4018
250 #define CK_InputKillLine 4020
251 #define CK_InputHistoryPrev 4021
252 #define CK_InputHistoryNext 4022
253 #define CK_InputHistoryShow 4023
254 #define CK_InputComplete 4024
255 #define CK_InputPaste 4025
256 #define CK_InputClearLine 4026
258 #define CK_InputLeftHighlight 4027
259 #define CK_InputRightHighlight 4028
260 #define CK_InputWordLeftHighlight 4029
261 #define CK_InputWordRightHighlight 4030
262 #define CK_InputBolHighlight 4031
263 #define CK_InputEolHighlight 4032
265 /* Viewer */
266 #define CK_ViewHelp 5001
267 #define CK_ViewToggleWrapMode 5002
268 #define CK_ViewToggleHexEditMode 5003
269 #define CK_ViewToggleHexMode 5004
270 #define CK_ViewGoto 5005
271 #define CK_ViewHexEditSave 5006
272 #define CK_ViewSearch 5007
273 #define CK_ViewToggleMagicMode 5008
274 #define CK_ViewToggleNroffMode 5009
275 #define CK_ViewQuit 5010
276 #define CK_ViewContinueSearch 5011
277 #define CK_ViewGotoBookmark 5012
278 #define CK_ViewNewBookmark 5013
279 #define CK_ViewMoveUp 5014
280 #define CK_ViewMoveDown 5015
281 #define CK_ViewMoveLeft 5016
282 #define CK_ViewMoveRight 5017
283 #define CK_ViewMovePgDn 5018
284 #define CK_ViewMovePgUp 5019
285 #define CK_ViewMoveHalfPgDn 5020
286 #define CK_ViewMoveHalfPgUp 5021
287 #define CK_ViewMoveToBol 5022
288 #define CK_ViewMoveToEol 5023
289 #define CK_ViewNextFile 5024
290 #define CK_ViewPrevFile 5025
291 #define CK_ViewToggleRuler 5026
292 #define CK_ViewToggleHexNavMode 5027
294 /* Tree */
295 #define CK_TreeHelp 6001
296 #define CK_TreeForget 6003
297 #define CK_TreeToggleNav 6004
298 #define CK_TreeCopy 6005
299 #define CK_TreeMove 6006
300 #define CK_TreeMake 6007
301 #define CK_TreeMoveUp 6011
302 #define CK_TreeMoveDown 6012
303 #define CK_TreeMoveLeft 6013
304 #define CK_TreeMoveRight 6014
305 #define CK_TreeMoveHome 6015
306 #define CK_TreeMoveEnd 6016
307 #define CK_TreeMovePgUp 6017
308 #define CK_TreeMovePgDn 6018
309 #define CK_TreeOpen 6019
310 #define CK_TreeRescan 6020
311 #define CK_TreeStartSearch 6021
312 #define CK_TreeRemove 6022
314 /* main commands */
315 #define CK_AddHotlist 7001
316 #define CK_ChangeListingCmd 7002
317 #define CK_ChmodCmd 7003
318 #define CK_ChownAdvancedCmd 7004
319 #define CK_ChownCmd 7005
320 #define CK_CompareDirsCmd 7006
321 #define CK_ConfigureBox 7007
322 #define CK_ConfigureVfs 7008
323 #define CK_ConfirmBox 7009
324 #define CK_CopyCmd 7010
325 #define CK_CopyCurrentPathname 7011
326 #define CK_CopyCurrentReadlink 7012
327 #define CK_CopyCurrentTagged 7013
328 #define CK_CopyOtherPathname 7014
329 #define CK_CopyOtherReadlink 7015
330 #define CK_CopyOtherTagged 7016
331 #define CK_DeleteCmd 7017
332 #define CK_DirsizesCmd 7018
333 #define CK_DisplayBitsBox 7019
334 #define CK_EditCmd 7020
335 #define CK_EditExtFileCmd 7021
336 #define CK_EditFhlFileCmd 7022
337 #define CK_EditMcMenuCmd 7023
338 #define CK_EditSymlinkCmd 7024
339 #define CK_EditSyntaxCmd 7025
340 #define CK_EditUserMenuCmd 7026
341 #define CK_ExternalPanelize 7027
342 #define CK_FilterCmd 7028
343 #define CK_FilteredViewCmd 7029
344 #define CK_FindCmd 7030
345 #define CK_FishlinkCmd 7031
346 #define CK_FtplinkCmd 7032
347 #define CK_HistoryCmd 7033
348 #define CK_InfoCmd 7034
349 #define CK_JobsCmd 7035
350 #define CK_LayoutBox 7036
351 #define CK_LearnKeys 7037
352 #define CK_LinkCmd 7038
353 #define CK_ListingCmd 7039
354 #define CK_ListmodeCmd 7042
355 #define CK_MenuLastSelectedCmd 7044
356 #define CK_MkdirCmd 7045
357 #define CK_NetlinkCmd 7046
358 #define CK_QuickCdCmd 7047
359 #define CK_QuickChdirCmd 7048
360 #define CK_QuickViewCmd 7049
361 #define CK_QuietQuitCmd 7050
362 #define CK_QuitCmd 7051
363 #define CK_RenameCmd 7052
364 #define CK_RereadCmd 7053
365 #define CK_ReselectVfs 7054
366 #define CK_ReverseSelectionCmd 7055
367 #define CK_SaveSetupCmd 7056
368 #define CK_SelectCmd 7057
369 #define CK_SingleDirsizeCmd 7058
370 #define CK_SmblinkCmd 7059
371 #define CK_SuspendCmd 7060
372 #define CK_SwapCmd 7061
373 #define CK_SymlinkCmd 7062
374 #define CK_ToggleListingCmd 7063
375 #define CK_ToggleShowHidden 7064
376 #define CK_TreeCmd 7065
377 #define CK_TreeBoxCmd 7066
378 #define CK_UndeleteCmd 7067
379 #define CK_UnselectCmd 7068
380 #define CK_UserFileMenuCmd 7069
381 #define CK_UserMenuCmd 7070
382 #define CK_ViewCmd 7071
383 #define CK_ViewFileCmd 7072
384 #define CK_HelpCmd 7073
385 #define CK_MenuCmd 7074
386 #define CK_TogglePanelsSplit 7075
387 #define CK_DiffViewCmd 7076
388 #define CK_PanelOptionsBox 7077
389 #define CK_RelativeSymlinkCmd 7078
391 /* panels */
392 #define CK_PanelChdirOtherPanel 8001
393 #define CK_PanelChdirToReadlink 8002
394 #define CK_PanelCmdCopyLocal 8003
395 #define CK_PanelCmdDeleteLocal 8004
396 #define CK_PanelCmdDoEnter 8005
397 #define CK_PanelCmdEditNew 8006
398 #define CK_PanelCmdRenameLocal 8007
399 #define CK_PanelCmdReverseSelection 8008
400 #define CK_PanelCmdSelect 8009
401 #define CK_PanelCmdUnselect 8010
402 #define CK_PanelCmdViewSimple 8011
403 #define CK_PanelCtrlNextPage 8012
404 #define CK_PanelCtrlPrevPage 8013
405 #define CK_PanelDirectoryHistoryList 8014
406 #define CK_PanelDirectoryHistoryNext 8015
407 #define CK_PanelDirectoryHistoryPrev 8016
408 #define CK_PanelGotoBottomFile 8017
409 #define CK_PanelGotoMiddleFile 8018
410 #define CK_PanelGotoTopFile 8019
411 #define CK_PanelMarkFile 8020
412 #define CK_PanelMarkFileUp 8021
413 #define CK_PanelMarkFileDown 8022
414 #define CK_PanelMoveDown 8023
415 #define CK_PanelMoveEnd 8024
416 #define CK_PanelMoveHome 8025
417 #define CK_PanelMoveUp 8026
418 #define CK_PanelMoveLeft 8027
419 #define CK_PanelMoveRight 8028
420 #define CK_PanelNextPage 8029
421 #define CK_PanelPrevPage 8030
422 #define CK_PanelSetPanelEncoding 8031
423 #define CK_PanelStartSearch 8032
424 #define CK_PanelSyncOtherPanel 8033
425 #define CK_PanelToggleSortOrderNext 8034
426 #define CK_PanelToggleSortOrderPrev 8035
427 #define CK_PanelSelectSortOrder 8036
428 #define CK_PanelReverseSort 8037
429 #define CK_PanelSortOrderByName 8038
430 #define CK_PanelSortOrderByExt 8039
431 #define CK_PanelSortOrderBySize 8040
432 #define CK_PanelSortOrderByMTime 8041
434 /* diff viewer */
435 #define CK_DiffDisplaySymbols 9001
436 #define CK_DiffDisplayNumbers 9002
437 #define CK_DiffFull 9003
438 #define CK_DiffEqual 9004
439 #define CK_DiffSplitMore 9005
440 #define CK_DiffSplitLess 9006
441 #define CK_DiffShowDiff 9008
442 #define CK_DiffSetTab2 9009
443 #define CK_DiffSetTab3 9010
444 #define CK_DiffSetTab4 9011
445 #define CK_DiffSetTab8 9012
446 #define CK_DiffSwapPanel 9013
447 #define CK_DiffRedo 9014
448 #define CK_DiffNextHunk 9015
449 #define CK_DiffPrevHunk 9016
450 #define CK_DiffGoto 9017
451 #define CK_DiffEditCurrent 9018
452 #define CK_DiffEditOther 9019
453 #define CK_DiffSearch 9020
454 #define CK_DiffEOF 9021
455 #define CK_DiffBOF 9022
456 #define CK_DiffDown 9023
457 #define CK_DiffUp 9024
458 #define CK_DiffLeft 9025
459 #define CK_DiffRight 9026
460 #define CK_DiffQuickLeft 9027
461 #define CK_DiffQuickRight 9028
462 #define CK_DiffPageDown 9029
463 #define CK_DiffPageUp 9030
464 #define CK_DiffHome 9031
465 #define CK_DiffEnd 9032
466 #define CK_DiffQuit 9033
467 #define CK_DiffHelp 9034
468 #define CK_DiffMergeCurrentHunk 9035
469 #define CK_DiffSave 9036
470 #define CK_DiffContinueSearch 9037
471 #define CK_DiffOptions 9038
474 Process a block through a shell command: CK_Pipe_Block(i) executes shell_cmd[i].
475 shell_cmd[i] must process the file ~/cooledit.block and output ~/cooledit.block
476 which is then inserted into the text in place of the original block. shell_cmd[i] must
477 also produce a file homedir/cooledit.error . If this file is not empty an error will
478 have been assumed to have occured, and the block will not be replaced.
479 TODO: bring up a viewer to display the error message instead of inserting
480 it into the text, which is annoying.
482 #define CK_Pipe_Block(i) (1000+(i))
483 #define SHELL_COMMANDS_i {"/edit.indent.rc", "/edit.spell.rc", /* and so on */ 0 }
484 #define CK_Macro(i) (2000+(i))
485 #define CK_Last_Macro CK_Macro(0x7FFF)
486 #else
488 #define CK_User_Command(i) ((i) | (1 << 16))
489 #define IS_USER_COMMAND(i) ((i) & (1 << 16))
490 #define CK_Macro(i) ((i) | (1 << 17))
491 #define IS_MACRO_COMMAND(i) ((i) & (1 << 17))
493 #endif /* MC_CMD_DEF_H */