diff --git a/resources/ui/midipattern.ui b/resources/ui/midipattern.ui index a982f3092..a161b2aba 100644 --- a/resources/ui/midipattern.ui +++ b/resources/ui/midipattern.ui @@ -403,7 +403,7 @@ 0 0 755 - 20 + 23 @@ -428,6 +428,9 @@ &Quit + + Esc + diff --git a/source/frontend/widgets/pianoroll.py b/source/frontend/widgets/pianoroll.py index 6e60eabdb..386014f65 100755 --- a/source/frontend/widgets/pianoroll.py +++ b/source/frontend/widgets/pianoroll.py @@ -24,7 +24,7 @@ from PyQt5.QtCore import Qt, QRectF, QPointF, pyqtSignal from PyQt5.QtGui import QColor, QCursor, QFont, QPen, QPainter, QTransform from PyQt5.QtWidgets import QGraphicsItem, QGraphicsLineItem, QGraphicsOpacityEffect, QGraphicsRectItem, QGraphicsSimpleTextItem from PyQt5.QtWidgets import QGraphicsScene, QGraphicsView -from PyQt5.QtWidgets import QWidget, QLabel, QComboBox, QHBoxLayout, QVBoxLayout, QStyle +from PyQt5.QtWidgets import QApplication, QComboBox, QHBoxLayout, QLabel, QStyle, QVBoxLayout, QWidget # ------------------------------------------------------------------------------------------------------------ # Imports (Custom) @@ -474,6 +474,10 @@ class PianoRoll(QGraphicsScene): def keyPressEvent(self, event): QGraphicsScene.keyPressEvent(self, event) + if event.key() == Qt.Key_Escape: + QApplication.instance().closeAllWindows() + return + if event.key() == Qt.Key_F: if not self.insert_mode: # turn off velocity mode