I created a Line with help of QgsMapTool
and I'm able to capture the single key in keyPressEvent
like this:
class buildingEditTool(QgsMapToolEdit):
def keyPressEvent(self, event):
if event.key() == Qt.Key_Backspace:
''' Do Something'''
then for a key combination I tried
class buildingEditTool(QgsMapToolEdit):
def keyPressEvent(self, event):
if event.matchs(QKeySequence(ctrl+k)):
''' Do Something'''
but it did not work.
How do I capture combination keys in keyPressEvent
?