--------------------------------------------------------------
| 1241 | |
| 1242 | //-------------------------------------------------------------- |
| 1243 | void DurationController::keyPressed(ofKeyEventArgs& keyArgs){ |
| 1244 | if(timeline.isModal()){ |
| 1245 | return; |
| 1246 | } |
| 1247 | |
| 1248 | if(gui->hasKeyboardFocus()){ |
| 1249 | return; |
| 1250 | } |
| 1251 | |
| 1252 | int key = keyArgs.key; |
| 1253 | if(key == ' '){ |
| 1254 | if(ofGetModifierShiftPressed()){ |
| 1255 | timeline.togglePlaySelectedTrack(); |
| 1256 | } |
| 1257 | else{ |
| 1258 | if(!timeline.getIsPlaying()){ |
| 1259 | startPlayback(); |
| 1260 | } |
| 1261 | else{ |
| 1262 | timeline.stop(); |
| 1263 | } |
| 1264 | } |
| 1265 | } |
| 1266 | |
| 1267 | if(key == 'i'){ |
| 1268 | if(ofGetModifierAltPressed()){ |
| 1269 | timeline.setInPointAtMillis(0); |
| 1270 | } |
| 1271 | else{ |
| 1272 | timeline.setInPointAtPlayhead(); |
| 1273 | } |
| 1274 | } |
| 1275 | |
| 1276 | if(key == 'o'){ |
| 1277 | if(ofGetModifierAltPressed()){ |
| 1278 | timeline.setOutPointAtPercent(1.0); |
| 1279 | } |
| 1280 | else{ |
| 1281 | timeline.setOutPointAtPlayhead(); |
| 1282 | } |
| 1283 | } |
| 1284 | |
| 1285 | |
| 1286 | if(ofGetModifierShortcutKeyPressed() && (key == 's' || key=='s'-96) ){ |
| 1287 | saveProject(); |
| 1288 | } |
| 1289 | |
| 1290 | } |
| 1291 | |
| 1292 | //-------------------------------------------------------------- |
| 1293 | void DurationController::startPlayback(){ |
nothing calls this directly
no outgoing calls
no test coverage detected