def fixed_shortcut(keystr, parent, action):
 sc = QShortcut(QKeySequence(keystr), parent, action)
 sc.setContext(Qt.WidgetWithChildrenShortcut)
 return sc

def fixed_shortcut ( keystr , parent , action ) : sc = QShortcut ( QKeySequence ( keystr ) , parent , action ) sc . setContext ( Qt . WidgetWithChildrenShortcut ) return sc
deprecated: this function will be removed in spyder 4 .