~ubuntu-branches/ubuntu/oneiric/tuxguitar/oneiric

« back to all changes in this revision

Viewing changes to TuxGuitar/src/org/herac/tuxguitar/gui/system/keybindings/KeyBindingActionDefaults.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mto: (5.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080619003030-h719szrhsngou7c6
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.herac.tuxguitar.gui.system.keybindings;
 
2
 
 
3
import java.util.ArrayList;
 
4
import java.util.List;
 
5
 
 
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;
 
56
 
 
57
public class KeyBindingActionDefaults {
 
58
        
 
59
        public static List getDefaultKeyBindings(){
 
60
                List list = new ArrayList();
 
61
                
 
62
                //New File: 'Ctrl + N'
 
63
                list.add(new KeyBindingAction(NewFileAction.NAME,new KeyBinding(110,KeyBindingConstants.CONTROL)));
 
64
                
 
65
                //Open File: 'Ctrl + O'
 
66
                list.add(new KeyBindingAction(OpenFileAction.NAME,new KeyBinding(111,KeyBindingConstants.CONTROL)));
 
67
                
 
68
                //Save File: 'Ctrl + S'
 
69
                list.add(new KeyBindingAction(SaveFileAction.NAME,new KeyBinding(115,KeyBindingConstants.CONTROL)));
 
70
                
 
71
                //Save File As: 'F12'
 
72
                list.add(new KeyBindingAction(SaveAsFileAction.NAME,new KeyBinding(KeyBindingConstants.F12,0)));
 
73
                
 
74
                //Exit: 'Alt + F4'
 
75
                list.add(new KeyBindingAction(ExitAction.NAME,new KeyBinding(KeyBindingConstants.F4,KeyBindingConstants.ALT)));
 
76
                
 
77
                //Print: 'Ctrl + P'
 
78
                list.add(new KeyBindingAction(PrintAction.NAME,new KeyBinding(112,KeyBindingConstants.CONTROL)));
 
79
                
 
80
                //Undo: 'Ctrl + Z'
 
81
                list.add(new KeyBindingAction(UndoAction.NAME,new KeyBinding(122,KeyBindingConstants.CONTROL)));
 
82
                
 
83
                //Redo: 'Ctrl + Y'
 
84
                list.add(new KeyBindingAction(RedoAction.NAME,new KeyBinding(121,KeyBindingConstants.CONTROL)));
 
85
                
 
86
                //Copy Measure: 'Ctrl + C'
 
87
                list.add(new KeyBindingAction(CopyMeasureAction.NAME,new KeyBinding(99,KeyBindingConstants.CONTROL)));
 
88
                
 
89
                //Paste Measure: 'Ctrl + P'
 
90
                list.add(new KeyBindingAction(PasteMeasureAction.NAME,new KeyBinding(118,KeyBindingConstants.CONTROL)));
 
91
                
 
92
                //Song Properties: 'F5'
 
93
                list.add(new KeyBindingAction(ChangeInfoAction.NAME,new KeyBinding(KeyBindingConstants.F5,0)));
 
94
                
 
95
                //Go Next Measure: 'Ctrl + RIGHT'
 
96
                list.add(new KeyBindingAction(GoNextMeasureAction.NAME,new KeyBinding(KeyBindingConstants.RIGHT,KeyBindingConstants.CONTROL)));
 
97
                
 
98
                //Go Previous Measure: 'Ctrl + LEFT'
 
99
                list.add(new KeyBindingAction(GoPreviousMeasureAction.NAME,new KeyBinding(KeyBindingConstants.LEFT,KeyBindingConstants.CONTROL)));
 
100
                
 
101
                //Go First Measure: 'Ctrl + SHIFT + RIGHT'
 
102
                list.add(new KeyBindingAction(GoFirstMeasureAction.NAME,new KeyBinding(KeyBindingConstants.LEFT,KeyBindingConstants.CONTROL + KeyBindingConstants.SHIFT)));
 
103
                
 
104
                //Go Last Measure: 'Ctrl + SHIFT + RIGHT'
 
105
                list.add(new KeyBindingAction(GoLastMeasureAction.NAME,new KeyBinding(KeyBindingConstants.RIGHT,KeyBindingConstants.CONTROL + KeyBindingConstants.SHIFT)));
 
106
                
 
107
                //Add Track: 'Ctrl + SHIFT + INSERT'
 
108
                list.add(new KeyBindingAction(AddTrackAction.NAME,new KeyBinding(KeyBindingConstants.INSERT,KeyBindingConstants.CONTROL + KeyBindingConstants.SHIFT)));
 
109
                
 
110
                //Remove Track: 'Ctrl + SHIFT + DELETE'
 
111
                list.add(new KeyBindingAction(RemoveTrackAction.NAME,new KeyBinding(KeyBindingConstants.DELETE,KeyBindingConstants.CONTROL + KeyBindingConstants.SHIFT)));
 
112
                
 
113
                //Go Next Track: 'Ctrl + DOWN'
 
114
                list.add(new KeyBindingAction(GoNextTrackAction.NAME,new KeyBinding(KeyBindingConstants.DOWN,KeyBindingConstants.CONTROL)));
 
115
                
 
116
                //Go Previous Track: 'Ctrl + UP'
 
117
                list.add(new KeyBindingAction(GoPreviousTrackAction.NAME,new KeyBinding(KeyBindingConstants.UP,KeyBindingConstants.CONTROL)));
 
118
                
 
119
                //Go First Track: 'Ctrl + UP'
 
120
                list.add(new KeyBindingAction(GoFirstTrackAction.NAME,new KeyBinding(KeyBindingConstants.UP,KeyBindingConstants.CONTROL | KeyBindingConstants.SHIFT)));
 
121
                
 
122
                //Go Last Track: 'Ctrl + DOWN'
 
123
                list.add(new KeyBindingAction(GoLastTrackAction.NAME,new KeyBinding(KeyBindingConstants.DOWN,KeyBindingConstants.CONTROL | KeyBindingConstants.SHIFT)));
 
124
                
 
125
                //Add Marker: 'SHIFT + INSERT'
 
126
                list.add(new KeyBindingAction(AddMarkerAction.NAME,new KeyBinding(KeyBindingConstants.INSERT,KeyBindingConstants.SHIFT)));
 
127
                
 
128
                //Go Next Marker: 'Alt + RIGHT'
 
129
                list.add(new KeyBindingAction(GoNextMarkerAction.NAME,new KeyBinding(KeyBindingConstants.RIGHT,KeyBindingConstants.ALT)));
 
130
                
 
131
                //Go Previous Marker: 'Alt + LEFT'
 
132
                list.add(new KeyBindingAction(GoPreviousMarkerAction.NAME,new KeyBinding(KeyBindingConstants.LEFT,KeyBindingConstants.ALT)));
 
133
                
 
134
                //Play-Pause: 'Space'
 
135
                list.add(new KeyBindingAction(TransportPlayAction.NAME,new KeyBinding(KeyBindingConstants.SPACE,0)));
 
136
                
 
137
                //Play Mode: 'F9'
 
138
                list.add(new KeyBindingAction(TransportModeAction.NAME,new KeyBinding(KeyBindingConstants.F9,0)));
 
139
                
 
140
                //Clean Beat: 'Ctrl + DELETE'
 
141
                list.add(new KeyBindingAction(CleanBeatAction.NAME,new KeyBinding(KeyBindingConstants.DELETE,KeyBindingConstants.CONTROL)));
 
142
                
 
143
                //Shift Up:  'SHIFT + UP'
 
144
                list.add(new KeyBindingAction(ShiftNoteUpAction.NAME,new KeyBinding(KeyBindingConstants.UP,KeyBindingConstants.SHIFT)));
 
145
                
 
146
                //Shift Up:  'SHIFT + DOWN'
 
147
                list.add(new KeyBindingAction(ShiftNoteDownAction.NAME,new KeyBinding(KeyBindingConstants.DOWN,KeyBindingConstants.SHIFT)));
 
148
                
 
149
                //Increment semitone: 'SHIFT + RIGHT'
 
150
                list.add(new KeyBindingAction(IncrementNoteSemitoneAction.NAME,new KeyBinding(KeyBindingConstants.RIGHT,KeyBindingConstants.SHIFT)));
 
151
                
 
152
                //Decrement semitone: 'SHIFT + LEFT'
 
153
                list.add(new KeyBindingAction(DecrementNoteSemitoneAction.NAME,new KeyBinding(KeyBindingConstants.LEFT,KeyBindingConstants.SHIFT)));
 
154
                
 
155
                //Dotted Duration: '*'
 
156
                list.add(new KeyBindingAction(ChangeDottedDurationAction.NAME,new KeyBinding(KeyBindingConstants.KEYPAD_MULTIPLY,0)));
 
157
                
 
158
                //Tupleto Duration: '/'
 
159
                list.add(new KeyBindingAction(ChangeTupletoDurationAction.NAME,new KeyBinding(KeyBindingConstants.KEYPAD_DIVIDE,0)));
 
160
                
 
161
                //Tied note: 'L'
 
162
                list.add(new KeyBindingAction(ChangeTiedNoteAction.NAME,new KeyBinding(108,0)));
 
163
                
 
164
                //Insert Chord: 'A'
 
165
                list.add(new KeyBindingAction(InsertChordAction.NAME,new KeyBinding(97,0)));
 
166
                
 
167
                //Insert Text: 'T'
 
168
                list.add(new KeyBindingAction(InsertTextAction.NAME,new KeyBinding(116,0)));
 
169
                
 
170
                //Bend: 'B'
 
171
                list.add(new KeyBindingAction(ChangeBendNoteAction.NAME,new KeyBinding(98,0)));
 
172
                
 
173
                //Ghost: 'O'
 
174
                list.add(new KeyBindingAction(ChangeGhostNoteAction.NAME,new KeyBinding(111,0)));
 
175
                
 
176
                //Hammer on/Pull off: 'H'
 
177
                list.add(new KeyBindingAction(ChangeHammerNoteAction.NAME,new KeyBinding(104,0)));
 
178
                
 
179
                //Slide up/down: 'S'
 
180
                list.add(new KeyBindingAction(ChangeSlideNoteAction.NAME,new KeyBinding(115,0)));
 
181
                
 
182
                //Vibrato: 'V'
 
183
                list.add(new KeyBindingAction(ChangeVibratoNoteAction.NAME,new KeyBinding(118,0)));
 
184
                
 
185
                //Dead note: 'X'
 
186
                list.add(new KeyBindingAction(ChangeDeadNoteAction.NAME,new KeyBinding(120,0)));
 
187
                
 
188
                //Palm mute: 'P'
 
189
                list.add(new KeyBindingAction(ChangePalmMuteAction.NAME,new KeyBinding(112,0)));
 
190
                
 
191
                //Grace note: 'G'
 
192
                list.add(new KeyBindingAction(ChangeGraceNoteAction.NAME,new KeyBinding(103,0)));
 
193
                
 
194
                //Fade in: 'F'
 
195
                list.add(new KeyBindingAction(ChangeFadeInAction.NAME,new KeyBinding(102,0)));
 
196
                
 
197
                //Browser: 'Ctrl + B'
 
198
                list.add(new KeyBindingAction(TGBrowserAction.NAME,new KeyBinding(98,KeyBindingConstants.CONTROL)));
 
199
                
 
200
                //Show Mixer: 'Ctrl + M'
 
201
                list.add(new KeyBindingAction(ShowMixerAction.NAME,new KeyBinding(109,KeyBindingConstants.CONTROL)));
 
202
                
 
203
                //Show Transport: 'Ctrl + T'
 
204
                list.add(new KeyBindingAction(ShowTransportAction.NAME,new KeyBinding(116,KeyBindingConstants.CONTROL)));
 
205
                
 
206
                //Show Settings: 'F1'
 
207
                list.add(new KeyBindingAction(EditConfigAction.NAME,new KeyBinding(KeyBindingConstants.F7,0)));
 
208
                
 
209
                //Show Help: 'F1'
 
210
                list.add(new KeyBindingAction(ShowDocAction.NAME,new KeyBinding(KeyBindingConstants.F1,0)));
 
211
                
 
212
                return list;
 
213
        }
 
214
}