#from __future__ import unicode_literals # -*- coding: utf-8 -*- """gestion des raccourcis claviers""" from PyQt4.QtCore import * from PyQt4.QtGui import * def touchesEnfoncees(): """renvoie la/les touche(s) clavier actuellement enfoncee(s)""" retour = [] touches = QApplication.keyboardModifiers() if touches == Qt.ShiftModifier: retour = ["maj"] elif touches == Qt.ControlModifier: retour = ["ctrl"] elif touches == (Qt.ControlModifier | Qt.ShiftModifier): retour = ["ctrl", "maj"] return retour