1
package org.herac.tuxguitar.gui.system.keybindings;
3
import java.util.ArrayList;
6
import org.herac.tuxguitar.gui.actions.composition.ChangeInfoAction;
7
import org.herac.tuxguitar.gui.actions.duration.ChangeDottedDurationAction;
8
import org.herac.tuxguitar.gui.actions.duration.ChangeTupletoDurationAction;
9
import org.herac.tuxguitar.gui.actions.edit.RedoAction;
10
import org.herac.tuxguitar.gui.actions.edit.UndoAction;
11
import org.herac.tuxguitar.gui.actions.effects.ChangeBendNoteAction;
12
import org.herac.tuxguitar.gui.actions.effects.ChangeDeadNoteAction;
13
import org.herac.tuxguitar.gui.actions.effects.ChangeFadeInAction;
14
import org.herac.tuxguitar.gui.actions.effects.ChangeGhostNoteAction;
15
import org.herac.tuxguitar.gui.actions.effects.ChangeGraceNoteAction;
16
import org.herac.tuxguitar.gui.actions.effects.ChangeHammerNoteAction;
17
import org.herac.tuxguitar.gui.actions.effects.ChangePalmMuteAction;
18
import org.herac.tuxguitar.gui.actions.effects.ChangeSlideNoteAction;
19
import org.herac.tuxguitar.gui.actions.effects.ChangeVibratoNoteAction;
20
import org.herac.tuxguitar.gui.actions.file.ExitAction;
21
import org.herac.tuxguitar.gui.actions.file.NewFileAction;
22
import org.herac.tuxguitar.gui.actions.file.OpenFileAction;
23
import org.herac.tuxguitar.gui.actions.file.PrintAction;
24
import org.herac.tuxguitar.gui.actions.file.SaveAsFileAction;
25
import org.herac.tuxguitar.gui.actions.file.SaveFileAction;
26
import org.herac.tuxguitar.gui.actions.help.ShowDocAction;
27
import org.herac.tuxguitar.gui.actions.insert.InsertChordAction;
28
import org.herac.tuxguitar.gui.actions.insert.InsertTextAction;
29
import org.herac.tuxguitar.gui.actions.marker.AddMarkerAction;
30
import org.herac.tuxguitar.gui.actions.marker.GoNextMarkerAction;
31
import org.herac.tuxguitar.gui.actions.marker.GoPreviousMarkerAction;
32
import org.herac.tuxguitar.gui.actions.measure.CopyMeasureAction;
33
import org.herac.tuxguitar.gui.actions.measure.GoFirstMeasureAction;
34
import org.herac.tuxguitar.gui.actions.measure.GoLastMeasureAction;
35
import org.herac.tuxguitar.gui.actions.measure.GoNextMeasureAction;
36
import org.herac.tuxguitar.gui.actions.measure.GoPreviousMeasureAction;
37
import org.herac.tuxguitar.gui.actions.measure.PasteMeasureAction;
38
import org.herac.tuxguitar.gui.actions.note.ChangeTiedNoteAction;
39
import org.herac.tuxguitar.gui.actions.note.CleanBeatAction;
40
import org.herac.tuxguitar.gui.actions.note.DecrementNoteSemitoneAction;
41
import org.herac.tuxguitar.gui.actions.note.IncrementNoteSemitoneAction;
42
import org.herac.tuxguitar.gui.actions.note.ShiftNoteDownAction;
43
import org.herac.tuxguitar.gui.actions.note.ShiftNoteUpAction;
44
import org.herac.tuxguitar.gui.actions.settings.EditConfigAction;
45
import org.herac.tuxguitar.gui.actions.tools.TGBrowserAction;
46
import org.herac.tuxguitar.gui.actions.track.AddTrackAction;
47
import org.herac.tuxguitar.gui.actions.track.GoFirstTrackAction;
48
import org.herac.tuxguitar.gui.actions.track.GoLastTrackAction;
49
import org.herac.tuxguitar.gui.actions.track.GoNextTrackAction;
50
import org.herac.tuxguitar.gui.actions.track.GoPreviousTrackAction;
51
import org.herac.tuxguitar.gui.actions.track.RemoveTrackAction;
52
import org.herac.tuxguitar.gui.actions.transport.TransportModeAction;
53
import org.herac.tuxguitar.gui.actions.transport.TransportPlayAction;
54
import org.herac.tuxguitar.gui.actions.view.ShowMixerAction;
55
import org.herac.tuxguitar.gui.actions.view.ShowTransportAction;
57
public class KeyBindingActionDefaults {
59
public static List getDefaultKeyBindings(){
60
List list = new ArrayList();
62
//New File: 'Ctrl + N'
63
list.add(new KeyBindingAction(NewFileAction.NAME,new KeyBinding(110,KeyBindingConstants.CONTROL)));
65
//Open File: 'Ctrl + O'
66
list.add(new KeyBindingAction(OpenFileAction.NAME,new KeyBinding(111,KeyBindingConstants.CONTROL)));
68
//Save File: 'Ctrl + S'
69
list.add(new KeyBindingAction(SaveFileAction.NAME,new KeyBinding(115,KeyBindingConstants.CONTROL)));
72
list.add(new KeyBindingAction(SaveAsFileAction.NAME,new KeyBinding(KeyBindingConstants.F12,0)));
75
list.add(new KeyBindingAction(ExitAction.NAME,new KeyBinding(KeyBindingConstants.F4,KeyBindingConstants.ALT)));
78
list.add(new KeyBindingAction(PrintAction.NAME,new KeyBinding(112,KeyBindingConstants.CONTROL)));
81
list.add(new KeyBindingAction(UndoAction.NAME,new KeyBinding(122,KeyBindingConstants.CONTROL)));
84
list.add(new KeyBindingAction(RedoAction.NAME,new KeyBinding(121,KeyBindingConstants.CONTROL)));
86
//Copy Measure: 'Ctrl + C'
87
list.add(new KeyBindingAction(CopyMeasureAction.NAME,new KeyBinding(99,KeyBindingConstants.CONTROL)));
89
//Paste Measure: 'Ctrl + P'
90
list.add(new KeyBindingAction(PasteMeasureAction.NAME,new KeyBinding(118,KeyBindingConstants.CONTROL)));
92
//Song Properties: 'F5'
93
list.add(new KeyBindingAction(ChangeInfoAction.NAME,new KeyBinding(KeyBindingConstants.F5,0)));
95
//Go Next Measure: 'Ctrl + RIGHT'
96
list.add(new KeyBindingAction(GoNextMeasureAction.NAME,new KeyBinding(KeyBindingConstants.RIGHT,KeyBindingConstants.CONTROL)));
98
//Go Previous Measure: 'Ctrl + LEFT'
99
list.add(new KeyBindingAction(GoPreviousMeasureAction.NAME,new KeyBinding(KeyBindingConstants.LEFT,KeyBindingConstants.CONTROL)));
101
//Go First Measure: 'Ctrl + SHIFT + RIGHT'
102
list.add(new KeyBindingAction(GoFirstMeasureAction.NAME,new KeyBinding(KeyBindingConstants.LEFT,KeyBindingConstants.CONTROL + KeyBindingConstants.SHIFT)));
104
//Go Last Measure: 'Ctrl + SHIFT + RIGHT'
105
list.add(new KeyBindingAction(GoLastMeasureAction.NAME,new KeyBinding(KeyBindingConstants.RIGHT,KeyBindingConstants.CONTROL + KeyBindingConstants.SHIFT)));
107
//Add Track: 'Ctrl + SHIFT + INSERT'
108
list.add(new KeyBindingAction(AddTrackAction.NAME,new KeyBinding(KeyBindingConstants.INSERT,KeyBindingConstants.CONTROL + KeyBindingConstants.SHIFT)));
110
//Remove Track: 'Ctrl + SHIFT + DELETE'
111
list.add(new KeyBindingAction(RemoveTrackAction.NAME,new KeyBinding(KeyBindingConstants.DELETE,KeyBindingConstants.CONTROL + KeyBindingConstants.SHIFT)));
113
//Go Next Track: 'Ctrl + DOWN'
114
list.add(new KeyBindingAction(GoNextTrackAction.NAME,new KeyBinding(KeyBindingConstants.DOWN,KeyBindingConstants.CONTROL)));
116
//Go Previous Track: 'Ctrl + UP'
117
list.add(new KeyBindingAction(GoPreviousTrackAction.NAME,new KeyBinding(KeyBindingConstants.UP,KeyBindingConstants.CONTROL)));
119
//Go First Track: 'Ctrl + UP'
120
list.add(new KeyBindingAction(GoFirstTrackAction.NAME,new KeyBinding(KeyBindingConstants.UP,KeyBindingConstants.CONTROL | KeyBindingConstants.SHIFT)));
122
//Go Last Track: 'Ctrl + DOWN'
123
list.add(new KeyBindingAction(GoLastTrackAction.NAME,new KeyBinding(KeyBindingConstants.DOWN,KeyBindingConstants.CONTROL | KeyBindingConstants.SHIFT)));
125
//Add Marker: 'SHIFT + INSERT'
126
list.add(new KeyBindingAction(AddMarkerAction.NAME,new KeyBinding(KeyBindingConstants.INSERT,KeyBindingConstants.SHIFT)));
128
//Go Next Marker: 'Alt + RIGHT'
129
list.add(new KeyBindingAction(GoNextMarkerAction.NAME,new KeyBinding(KeyBindingConstants.RIGHT,KeyBindingConstants.ALT)));
131
//Go Previous Marker: 'Alt + LEFT'
132
list.add(new KeyBindingAction(GoPreviousMarkerAction.NAME,new KeyBinding(KeyBindingConstants.LEFT,KeyBindingConstants.ALT)));
134
//Play-Pause: 'Space'
135
list.add(new KeyBindingAction(TransportPlayAction.NAME,new KeyBinding(KeyBindingConstants.SPACE,0)));
138
list.add(new KeyBindingAction(TransportModeAction.NAME,new KeyBinding(KeyBindingConstants.F9,0)));
140
//Clean Beat: 'Ctrl + DELETE'
141
list.add(new KeyBindingAction(CleanBeatAction.NAME,new KeyBinding(KeyBindingConstants.DELETE,KeyBindingConstants.CONTROL)));
143
//Shift Up: 'SHIFT + UP'
144
list.add(new KeyBindingAction(ShiftNoteUpAction.NAME,new KeyBinding(KeyBindingConstants.UP,KeyBindingConstants.SHIFT)));
146
//Shift Up: 'SHIFT + DOWN'
147
list.add(new KeyBindingAction(ShiftNoteDownAction.NAME,new KeyBinding(KeyBindingConstants.DOWN,KeyBindingConstants.SHIFT)));
149
//Increment semitone: 'SHIFT + RIGHT'
150
list.add(new KeyBindingAction(IncrementNoteSemitoneAction.NAME,new KeyBinding(KeyBindingConstants.RIGHT,KeyBindingConstants.SHIFT)));
152
//Decrement semitone: 'SHIFT + LEFT'
153
list.add(new KeyBindingAction(DecrementNoteSemitoneAction.NAME,new KeyBinding(KeyBindingConstants.LEFT,KeyBindingConstants.SHIFT)));
155
//Dotted Duration: '*'
156
list.add(new KeyBindingAction(ChangeDottedDurationAction.NAME,new KeyBinding(KeyBindingConstants.KEYPAD_MULTIPLY,0)));
158
//Tupleto Duration: '/'
159
list.add(new KeyBindingAction(ChangeTupletoDurationAction.NAME,new KeyBinding(KeyBindingConstants.KEYPAD_DIVIDE,0)));
162
list.add(new KeyBindingAction(ChangeTiedNoteAction.NAME,new KeyBinding(108,0)));
165
list.add(new KeyBindingAction(InsertChordAction.NAME,new KeyBinding(97,0)));
168
list.add(new KeyBindingAction(InsertTextAction.NAME,new KeyBinding(116,0)));
171
list.add(new KeyBindingAction(ChangeBendNoteAction.NAME,new KeyBinding(98,0)));
174
list.add(new KeyBindingAction(ChangeGhostNoteAction.NAME,new KeyBinding(111,0)));
176
//Hammer on/Pull off: 'H'
177
list.add(new KeyBindingAction(ChangeHammerNoteAction.NAME,new KeyBinding(104,0)));
180
list.add(new KeyBindingAction(ChangeSlideNoteAction.NAME,new KeyBinding(115,0)));
183
list.add(new KeyBindingAction(ChangeVibratoNoteAction.NAME,new KeyBinding(118,0)));
186
list.add(new KeyBindingAction(ChangeDeadNoteAction.NAME,new KeyBinding(120,0)));
189
list.add(new KeyBindingAction(ChangePalmMuteAction.NAME,new KeyBinding(112,0)));
192
list.add(new KeyBindingAction(ChangeGraceNoteAction.NAME,new KeyBinding(103,0)));
195
list.add(new KeyBindingAction(ChangeFadeInAction.NAME,new KeyBinding(102,0)));
197
//Browser: 'Ctrl + B'
198
list.add(new KeyBindingAction(TGBrowserAction.NAME,new KeyBinding(98,KeyBindingConstants.CONTROL)));
200
//Show Mixer: 'Ctrl + M'
201
list.add(new KeyBindingAction(ShowMixerAction.NAME,new KeyBinding(109,KeyBindingConstants.CONTROL)));
203
//Show Transport: 'Ctrl + T'
204
list.add(new KeyBindingAction(ShowTransportAction.NAME,new KeyBinding(116,KeyBindingConstants.CONTROL)));
206
//Show Settings: 'F1'
207
list.add(new KeyBindingAction(EditConfigAction.NAME,new KeyBinding(KeyBindingConstants.F7,0)));
210
list.add(new KeyBindingAction(ShowDocAction.NAME,new KeyBinding(KeyBindingConstants.F1,0)));