'Show pressed keys.'

def keyPressEvent(self, e):

    lines = [str(utils.keyevent_to_string(e)), '', 'key:    0x{:x}'.format(int(e.key())), 'modifiers:    0x{:x}'.format(int(e.modifiers())), 'text:    {!r}'.format(e.text())]
    self._label.setText('\n'.join(lines))
