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