Skip to content

Commit

Permalink
Add needed macOS shortcuts (LMMS#4851)
Browse files Browse the repository at this point in the history
Fix insert bars, delete bars, delete notes on Apple keyboard
  • Loading branch information
tresf authored Feb 25, 2019
1 parent 4bceb30 commit 64386de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/gui/editors/AutomationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ void AutomationEditor::keyPressEvent(QKeyEvent * ke )
}
break;
case Qt::Key_Backspace:
case Qt::Key_Delete:
deleteSelectedValues();
ke->accept();
Expand Down
1 change: 1 addition & 0 deletions src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,7 @@ void PianoRoll::keyPressEvent(QKeyEvent* ke )
clearSelectedNotes();
break;

case Qt::Key_Backspace:
case Qt::Key_Delete:
deleteSelectedNotes();
ke->accept();
Expand Down
4 changes: 2 additions & 2 deletions src/gui/editors/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 64386de

Please sign in to comment.