mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-23 08:06:46 +00:00
PICARD-1039: Support Forward Delete as alternative to Del on macOS
This commit is contained in:
committed by
Philipp Wolfer
parent
b741be6402
commit
ff177db31f
@@ -171,7 +171,12 @@ class MainWindow(QtWidgets.QMainWindow, PreserveGeometry):
|
||||
function(self)
|
||||
|
||||
def keyPressEvent(self, event):
|
||||
if event.matches(QtGui.QKeySequence.Delete):
|
||||
# On macOS Command+Backspace triggers the so called "Forward Delete".
|
||||
# It should be treated the same as the Delete button.
|
||||
is_forward_delete = sys.platform == 'darwin' and \
|
||||
event.key() == QtCore.Qt.Key_Backspace and \
|
||||
event.modifiers() & QtCore.Qt.ControlModifier
|
||||
if event.matches(QtGui.QKeySequence.Delete) or is_forward_delete:
|
||||
if self.metadata_box.hasFocus():
|
||||
self.metadata_box.remove_selected_tags()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user