1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
|
//
// C++ Interface: shortcuts
//
// Description:
// Datastructures and declaration of shortcuts used in the application
//
// Author: Mathias Lundgren <lunar_shuttle@users.sourceforge.net>, (C) 2003
//
// Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003
//
//
#ifndef __SHORTCUTS_H__
#define __SHORTCUTS_H__
#include <list>
#include "xml.h"
//
// Shortcut categories
//
#define PROLL_SHRT 1 // Pianoroll shortcut
#define DEDIT_SHRT 2 // Drumedit shortcut
#define LEDIT_SHRT 4 // Listedit shortcut
#define SCORE_SHRT 8 // Score shortcut
#define ARRANG_SHRT 16 // Arranger shortcut
#define TRANSP_SHRT 32 // Transport shortcut
#define WAVE_SHRT 64 // Waveedit shortcut
#define GLOBAL_SHRT 128 // Global shortcuts
#define LMEDIT_SHRT 256 // List masteredit
#define MEDIT_SHRT 512 // Master editor
#define ALL_SHRT 1023 // All shortcuts
#define INVIS_SHRT 1024 // Shortcuts not shown in the config-dialog. Hard-coded. To avoid conflicts
#define SHRT_NUM_OF_CATEGORIES 7 //Number of shortcut categories
struct shortcut
{
int key;
const char* descr;
const char* xml; //xml-tag for config-file
int type;
};
struct shortcut_cg
{
int id_flag;
const char* name;
};
typedef struct shortcut ShortCut ;
enum {
//Transport/Positioning
SHRT_PLAY_SONG, //Enter
SHRT_PLAY_TOGGLE, //Space
SHRT_STOP, //Insert
SHRT_GOTO_START, // W
SHRT_GOTO_LEFT, //End-keypad
SHRT_GOTO_RIGHT, //Cursordown-keypad
SHRT_POS_INC, // Plus
SHRT_POS_DEC, // Minus
SHRT_TOGGLE_LOOP, // Slash
SHRT_TOGGLE_METRO, // C
SHRT_START_REC, // *(keypad)
SHRT_REC_CLEAR, // *(keypad)
SHRT_FULLSCREEN,
//Main + Drumeditor
SHRT_NEW, //Ctrl+N
SHRT_OPEN, //Ctrl+O
SHRT_SAVE, //Ctrl+S
//Used throughout the app:
SHRT_UNDO, //Ctrl+Z
SHRT_REDO, //Ctrl+Y
SHRT_COPY, //Ctrl+C
SHRT_CUT, //Ctrl+X
SHRT_PASTE, //Ctrl+V
SHRT_DELETE,//Delete
//Main:
SHRT_SAVE_AS, //Default: undefined
SHRT_OPEN_RECENT, //Ctrl+1
SHRT_LOAD_TEMPLATE, //Default: undefined
SHRT_CONFIG_PRINTER, //Ctrl+P
SHRT_IMPORT_MIDI, //Default: undefined
SHRT_EXPORT_MIDI, //Default: undefined
SHRT_IMPORT_PART, //!< Import midi part to current track & location, Default: undefined
SHRT_IMPORT_AUDIO, //Default: undefined
SHRT_QUIT, //Default: Ctrl+Q
SHRT_DESEL_PARTS, //Ctrl+B
SHRT_SELECT_PRTSTRACK, //Default: undefined
SHRT_OPEN_PIANO, //Ctrl+E
SHRT_OPEN_SCORE, //Ctrl+R
SHRT_OPEN_DRUMS, //Ctrl+D
SHRT_OPEN_LIST, //Ctrl+L
SHRT_OPEN_WAVE, //Ctrl+W
SHRT_OPEN_GRAPHIC_MASTER, //Ctrl+M
SHRT_OPEN_LIST_MASTER, //Ctrl+Shift+M
SHRT_OPEN_MIDI_TRANSFORM, //Ctrl+T
SHRT_GLOBAL_CUT, //Default: undefined
SHRT_GLOBAL_INSERT, //Default: undefined
SHRT_GLOBAL_SPLIT, //Default: undefined
SHRT_COPY_RANGE, //Default: Ctrl+Shift+C
SHRT_CUT_EVENTS, //Default: undefined
SHRT_OPEN_TRANSPORT, //F11
SHRT_OPEN_BIGTIME, //F12
SHRT_OPEN_MIXER, //Ctrl+*
SHRT_OPEN_MIXER2, //Ctrl+*
SHRT_OPEN_MARKER, // F9
SHRT_OPEN_CLIPS, //Default: undefined
SHRT_FOLLOW_JUMP, //Default: undefined
SHRT_FOLLOW_NO, //Default: undefined
SHRT_FOLLOW_CONTINUOUS, //Default: undefined
SHRT_GLOBAL_CONFIG, //Default: undefined
SHRT_CONFIG_SHORTCUTS, //Default: undefined
SHRT_CONFIG_METRONOME, //Default: undefined
SHRT_CONFIG_MIDISYNC, //Default: undefined
SHRT_MIDI_FILE_CONFIG, //Default: undefined
SHRT_APPEARANCE_SETTINGS, //Default: undefined
SHRT_CONFIG_MIDI_PORTS, //Default: undefined
SHRT_CONFIG_AUDIO_PORTS, //Default: undefined
//SHRT_SAVE_GLOBAL_CONFIG, //Default: undefined
SHRT_MIDI_EDIT_INSTRUMENTS, //Default: undefined
SHRT_MIDI_INPUT_TRANSFORM, //Default: undefined
SHRT_MIDI_INPUT_FILTER, //Default: undefined
SHRT_MIDI_INPUT_TRANSPOSE, //Default: undefined
SHRT_MIDI_REMOTE_CONTROL, //Default: undefined
SHRT_RANDOM_RHYTHM_GENERATOR, //Default: undefined
SHRT_MIDI_RESET, //Default: undefined
SHRT_MIDI_INIT, //Default: undefined
SHRT_MIDI_LOCAL_OFF, //Default: undefined
SHRT_AUDIO_BOUNCE_TO_TRACK, //Default: undefined
SHRT_AUDIO_BOUNCE_TO_FILE, //Default: undefined
SHRT_AUDIO_RESTART, //Default: undefined
SHRT_MIXER_AUTOMATION, //Default: undefined
SHRT_MIXER_SNAPSHOT, //Default: undefined
SHRT_MIXER_AUTOMATION_CLEAR, //Default: undefined
SHRT_ADD_MIDI_TRACK, //Default: Ctrl+J
SHRT_ADD_DRUM_TRACK, //Default: undefined
SHRT_ADD_WAVE_TRACK, //Default: undefined
SHRT_ADD_AUDIO_OUTPUT, //Default: undefined
SHRT_ADD_AUDIO_GROUP, //Default: undefined
SHRT_ADD_AUDIO_INPUT, //Default: undefined
SHRT_ADD_AUDIO_AUX, //Default: undefined
SHRT_RESET_MIDI, //Ctrl+Alt+Z
SHRT_OPEN_HELP, //F1
SHRT_START_WHATSTHIS, //Shift-F1
//Arranger, parts:
SHRT_EDIT_PART, //Enter
SHRT_SEL_ABOVE, //Up
SHRT_SEL_ABOVE_ADD, //move up and add to selection
SHRT_SEL_BELOW, //Down
SHRT_SEL_BELOW_ADD, //move down and add to selection
SHRT_INSERTMEAS, //Ctrl+Shift+M - insert measures
SHRT_PASTE_DIALOG, //CTRL+SHIFT+_V
SHRT_PASTE_CLONE, //CTRL+B
SHRT_PASTE_CLONE_DIALOG, //CTRL+SHIFT+B
//Arranger tracks
SHRT_SEL_TRACK_BELOW,
SHRT_SEL_TRACK_ABOVE,
//To be in arranger, pianoroll & drumeditor. p4.0.10 now globally handled, too.
SHRT_SELECT_ALL, //Ctrl+A
SHRT_SELECT_NONE, //Ctrl+Shift+A
SHRT_SELECT_INVERT, //Ctrl+I
SHRT_SELECT_ILOOP, //Default: Undefined
SHRT_SELECT_OLOOP, //Default: Undefined
SHRT_SELECT_PREV_PART, // Ctrl+-
SHRT_SELECT_NEXT_PART, // Ctrl++
SHRT_SEL_LEFT, //left
SHRT_SEL_LEFT_ADD, //move left and add to selection
SHRT_SEL_RIGHT, //Right
SHRT_SEL_RIGHT_ADD, //move right and add to selection
SHRT_INC_PITCH,
SHRT_DEC_PITCH,
SHRT_INC_POS,
SHRT_DEC_POS,
SHRT_POS_INC_NOSNAP,
SHRT_POS_DEC_NOSNAP,
/*
SHRT_POS_INC_BAR,
SHRT_POS_DEC_BAR,
SHRT_POS_INC_BAR_NOSNAP,
SHRT_POS_DEC_BAR_NOSNAP,
SHRT_POS_INC_BEAT,
SHRT_POS_DEC_BEAT,
SHRT_POS_INC_BEAT_NOSNAP,
SHRT_POS_DEC_BEAT_NOSNAP,
SHRT_POS_INC_TICK,
SHRT_POS_DEC_TICK,
SHRT_POS_INC_TICK_NOSNAP,
SHRT_POS_DEC_TICK_NOSNAP,
SHRT_POS_INC_MINUTE,
SHRT_POS_DEC_MINUTE,
SHRT_POS_INC_MINUTE_NOSNAP,
SHRT_POS_DEC_MINUTE_NOSNAP,
SHRT_POS_INC_SECOND,
SHRT_POS_DEC_SECOND,
SHRT_POS_INC_SECOND_NOSNAP,
SHRT_POS_DEC_SECOND_NOSNAP,
SHRT_POS_INC_FRAME,
SHRT_POS_DEC_FRAME,
*/
SHRT_LOCATORS_TO_SELECTION, //Alt+P, currently in arranger & pianoroll
SHRT_INSERT_AT_LOCATION, //Shift+CrsrRight
SHRT_INCREASE_LEN,
SHRT_DECREASE_LEN,
SHRT_TOOL_1,//Shift+1 Pointer
SHRT_TOOL_2,//Shift+2 Pen
SHRT_TOOL_3,//Shift+3 Rubber
SHRT_TOOL_4,//Shift+4
SHRT_TOOL_5,//Shift+5
SHRT_TOOL_6,//Shift+6
SHRT_TRANSPOSE, //Default: undefined
//Shortcuts to be in pianoroll & drumeditor
SHRT_ZOOM_IN, // PgUp
SHRT_ZOOM_OUT, // PgDown
SHRT_GOTO_CPOS, // c
SHRT_SCROLL_LEFT, // h
SHRT_SCROLL_RIGHT, // l
SHRT_FIXED_LEN, //Alt+L, currently only drumeditor
SHRT_QUANTIZE, //q
SHRT_MODIFY_GATE_TIME, //Default: undefined
SHRT_MODIFY_VELOCITY,
SHRT_CRESCENDO,
SHRT_DELETE_OVERLAPS,
SHRT_THIN_OUT,
SHRT_ERASE_EVENT,
SHRT_NOTE_SHIFT,
SHRT_MOVE_CLOCK,
SHRT_COPY_MEASURE,
SHRT_ERASE_MEASURE,
SHRT_DELETE_MEASURE,
SHRT_CREATE_MEASURE,
SHRT_SET_QUANT_1, //1 - pianoroll
SHRT_SET_QUANT_2, //2 - pianoroll
SHRT_SET_QUANT_3, //3 - pianoroll
SHRT_SET_QUANT_4, //4 - pianoroll
SHRT_SET_QUANT_5, //5 - pianoroll
SHRT_SET_QUANT_6, //6 - pianoroll
SHRT_SET_QUANT_7, //7 - pianoroll
SHRT_TOGGLE_TRIOL, //t
SHRT_TOGGLE_PUNCT, //.-keypad
SHRT_TOGGLE_PUNCT2, // ,
SHRT_EVENT_COLOR, //e
// Shortcuts for tools
// global
SHRT_TOOL_POINTER, //
SHRT_TOOL_PENCIL,
SHRT_TOOL_RUBBER,
// pianoroll and drum editor
SHRT_TOOL_LINEDRAW,
// drum editor
SHRT_TOOL_CURSOR,
SHRT_ADDNOTE_1,
SHRT_ADDNOTE_2,
SHRT_ADDNOTE_3,
SHRT_ADDNOTE_4,
SHRT_CURSOR_STEP_UP,
SHRT_CURSOR_STEP_DOWN,
SHRT_INSTRUMENT_STEP_DOWN,
SHRT_INSTRUMENT_STEP_UP,
// arranger
SHRT_TOOL_SCISSORS,
SHRT_TOOL_GLUE,
SHRT_TOOL_MUTE,
//Listeditor:
SHRT_LE_INS_NOTES, //Ctrl+N
SHRT_LE_INS_SYSEX, //Ctrl+S
SHRT_LE_INS_CTRL, //Ctrl+T
SHRT_LE_INS_META, //Default: undefined
SHRT_LE_INS_CHAN_AFTERTOUCH,//Ctrl+A
SHRT_LE_INS_POLY_AFTERTOUCH,//Ctrl+P
//List master editor:
SHRT_LM_INS_TEMPO, // Ctrl+T
SHRT_LM_INS_SIG, // Ctrl+R
SHRT_LM_EDIT_BEAT, // Ctrl+Shift+E
SHRT_LM_EDIT_VALUE,// Ctrl+E
SHRT_LM_INS_KEY, // Ctrl+K
// Marker view
SHRT_NEXT_MARKER,
SHRT_PREV_MARKER,
//Last item:
SHRT_NUM_OF_ELEMENTS // must be last
};
extern ShortCut shortcuts[SHRT_NUM_OF_ELEMENTS]; //size of last entry
extern void initShortCuts();
extern void writeShortCuts(int level, Xml& xml);
extern void readShortCuts (Xml& xml);
extern const shortcut_cg shortcut_category[SHRT_NUM_OF_CATEGORIES];
#endif
|