'Forward the captured action to the focused or default widget'

def _forward_action(self, name, *args, **kwargs):

    widget = QtWidgets.QApplication.focusWidget()
    if ((widget in self.widgets) and hasattr(widget, name)):
        fn = getattr(widget, name)
    else:
        fn = getattr(self.default, name)
    return fn(*args, **kwargs)
