<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def keyevent2tuple(event):

 """Convert QKeyEvent instance into a tuple"""

    return (event.type(), event.key(), event.modifiers(), event.text(),
            event.isAutoRepeat(), event.count())