add more commands into mc.keymap
[midnight-commander.git] / edit / editcmddef.h
blobfaf1c95d20e954d2e74847ac913fa556ffa5ac78
2 /** \file
3 * \brief Header: editor constants
4 */
6 #ifndef MC_EDIT_CMD_DEF_H
7 #define MC_EDIT_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
46 /* file commands */
47 #define CK_Save 101
48 #define CK_Load 102
49 #define CK_New 103
50 #define CK_Save_As 104
51 #define CK_Load_Prev_File 111
52 #define CK_Load_Next_File 112
53 #define CK_Load_Syntax_File 121
54 #define CK_Load_Menu_File 122
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
65 /* search and replace */
66 #define CK_Find 301
67 #define CK_Find_Again 302
68 #define CK_Replace 303
69 #define CK_Replace_Again 304
70 #define CK_Complete_Word 305
72 /* debugger commands */
73 #define CK_Debug_Start 350
74 #define CK_Debug_Stop 351
75 #define CK_Debug_Toggle_Break 352
76 #define CK_Debug_Clear 353
77 #define CK_Debug_Next 354
78 #define CK_Debug_Step 355
79 #define CK_Debug_Back_Trace 356
80 #define CK_Debug_Continue 357
81 #define CK_Debug_Enter_Command 358
82 #define CK_Debug_Until_Curser 359
84 /* misc */
85 #define CK_Insert_File 401
86 #define CK_Exit 402
87 #define CK_Toggle_Insert 403
88 #define CK_Help 404
89 #define CK_Date 405
90 #define CK_Refresh 406
91 #define CK_Goto 407
92 #define CK_Delete_Line 408
93 #define CK_Delete_To_Line_End 409
94 #define CK_Delete_To_Line_Begin 410
95 #define CK_Man_Page 411
96 #define CK_Sort 412
97 #define CK_Mail 413
98 #define CK_Cancel 414
99 #define CK_Complete 415
100 #define CK_Paragraph_Format 416
101 #define CK_Util 417
102 #define CK_Type_Load_Python 418
103 #define CK_Find_File 419
104 #define CK_Ctags 420
105 #define CK_Match_Bracket 421
106 #define CK_Terminal 422
107 #define CK_Terminal_App 423
108 #define CK_ExtCmd 424
109 #define CK_User_Menu 425
110 #define CK_Find_Definition 426
112 /* application control */
113 #define CK_Save_Desktop 451
114 #define CK_New_Window 452
115 #define CK_Cycle 453
116 #define CK_Menu 454
117 #define CK_Save_And_Quit 455
118 #define CK_Run_Another 456
119 #define CK_Check_Save_And_Quit 457
120 #define CK_Maximize 458
122 #define CK_Toggle_Tab_TWS 470
123 #define CK_Toggle_Syntax 480
124 #define CK_Toggle_Line_State 490
126 /* macro */
127 #define CK_Begin_Record_Macro 501
128 #define CK_End_Record_Macro 502
129 #define CK_Delete_Macro 503
131 /* book mark */
132 #define CK_Toggle_Bookmark 550
133 #define CK_Flush_Bookmarks 551
134 #define CK_Next_Bookmark 552
135 #define CK_Prev_Bookmark 553
137 /* highlight commands */
138 #define CK_Page_Up_Highlight 604
139 #define CK_Page_Down_Highlight 605
140 #define CK_Left_Highlight 606
141 #define CK_Right_Highlight 607
142 #define CK_Word_Left_Highlight 608
143 #define CK_Word_Right_Highlight 609
144 #define CK_Up_Highlight 610
145 #define CK_Down_Highlight 611
146 #define CK_Home_Highlight 612
147 #define CK_End_Highlight 613
148 #define CK_Beginning_Of_Text_Highlight 614
149 #define CK_End_Of_Text_Highlight 615
150 #define CK_Begin_Page_Highlight 616
151 #define CK_End_Page_Highlight 617
152 #define CK_Scroll_Up_Highlight 618
153 #define CK_Scroll_Down_Highlight 619
154 #define CK_Paragraph_Up_Highlight 620
155 #define CK_Paragraph_Down_Highlight 621
157 /* alt highlight commands */
158 #define CK_Page_Up_Alt_Highlight 654
159 #define CK_Page_Down_Alt_Highlight 655
160 #define CK_Left_Alt_Highlight 656
161 #define CK_Right_Alt_Highlight 657
162 #define CK_Word_Left_Alt_Highlight 658
163 #define CK_Word_Right_Alt_Highlight 659
164 #define CK_Up_Alt_Highlight 660
165 #define CK_Down_Alt_Highlight 661
166 #define CK_Home_Alt_Highlight 662
167 #define CK_End_Alt_Highlight 663
168 #define CK_Beginning_Of_Text_Alt_Highlight 664
169 #define CK_End_Of_Text_Alt_Highlight 665
170 #define CK_Begin_Page_Alt_Highlight 666
171 #define CK_End_Page_Alt_Highlight 667
172 #define CK_Scroll_Up_Alt_Highlight 668
173 #define CK_Scroll_Down_Alt_Highlight 669
174 #define CK_Paragraph_Up_Alt_Highlight 670
175 #define CK_Paragraph_Down_Alt_Highlight 671
178 /* X clipboard operations */
179 #define CK_XStore 701
180 #define CK_XCut 702
181 #define CK_XPaste 703
182 #define CK_Selection_History 704
184 #define CK_Shell 801
187 /* C-x or similar */
188 #define CK_Ext_Mode 820
191 #define CK_Select_Codepage 850
192 #define CK_Insert_Literal 851
193 #define CK_Execute_Macro 852
194 #define CK_Begin_End_Macro 853
197 Process a block through a shell command: CK_Pipe_Block(i) executes shell_cmd[i].
198 shell_cmd[i] must process the file ~/cooledit.block and output ~/cooledit.block
199 which is then inserted into the text in place of the original block. shell_cmd[i] must
200 also produce a file homedir/cooledit.error . If this file is not empty an error will
201 have been assumed to have occured, and the block will not be replaced.
202 TODO: bring up a viewer to display the error message instead of inserting
203 it into the text, which is annoying.
205 #define CK_Pipe_Block(i) (1000+(i))
206 #define SHELL_COMMANDS_i {"/edit.indent.rc", "/edit.spell.rc", /* and so on */ 0 }
207 #define CK_Macro(i) (2000+(i))
208 #define CK_Last_Macro CK_Macro(0x7FFF)
209 #else
211 #define CK_User_Command(i) ((i) | (1 << 16))
212 #define IS_USER_COMMAND(i) ((i) & (1 << 16))
213 #define CK_Macro(i) ((i) | (1 << 17))
214 #define IS_MACRO_COMMAND(i) ((i) & (1 << 17))
216 #endif