Add needed macOS shortcuts (#4851)

Fix insert bars, delete bars, delete notes on Apple keyboard
This commit is contained in:
Tres Finocchiaro
2019-02-24 21:57:53 -05:00
committed by GitHub
parent 31dc8e18ff
commit e34f75a8c7
3 changed files with 4 additions and 2 deletions

View File

@@ -404,6 +404,7 @@ void AutomationEditor::keyPressEvent(QKeyEvent * ke )
}
break;
case Qt::Key_Backspace:
case Qt::Key_Delete:
deleteSelectedValues();
ke->accept();

View File

@@ -1184,6 +1184,7 @@ void PianoRoll::keyPressEvent(QKeyEvent* ke )
clearSelectedNotes();
break;
case Qt::Key_Backspace:
case Qt::Key_Delete:
deleteSelectedNotes();
ke->accept();

View File

@@ -315,13 +315,13 @@ void SongEditor::keyPressEvent( QKeyEvent * ke )
{
if( /*_ke->modifiers() & Qt::ShiftModifier*/
gui->mainWindow()->isShiftPressed() == true &&
ke->key() == Qt::Key_Insert )
( ke->key() == Qt::Key_Insert || ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return ) )
{
m_song->insertBar();
}
else if(/* _ke->modifiers() & Qt::ShiftModifier &&*/
gui->mainWindow()->isShiftPressed() == true &&
ke->key() == Qt::Key_Delete )
( ke->key() == Qt::Key_Delete || ke->key() == Qt::Key_Backspace ) )
{
m_song->removeBar();
}