def build(cls, keys, down=None):
        """Build a key combination, such as:

        ctrl-t
        """
        codes = []
        for key in keys.split('-'):
            key = keycode(key)
            codes.append(key)

        events = []
        if down is None or down:
            for code in codes:
                events.append(cls(code, down=True))

        if down is None or not down:
            for code in reversed(codes):
                events.append(cls(code, down=False))
        return events
def build ( cls , keys , down = None ) : codes = [ ] for key in keys . split ( '-' ) : key = keycode ( key ) codes . append ( key ) events = [ ] if down is None or down : for code in codes : events . append ( cls ( code , down = True ) ) if down is None or not down : for code in reversed ( codes ) : events . append ( cls ( code , down = False ) ) return events
Build a key combination, such as:

        ctrl-t