def press_key(self, key, mode=<NUM_LIT:0>):
if isinstance(key, str):<EOL><INDENT>assert key in KEYS, '<STR_LIT>'.format(key)<EOL>key = KEYS[key]<EOL><DEDENT>_LOGGER.info('<STR_LIT>', self.__get_key_name(key))<EOL>return self.rq('<STR_LIT>', OrderedDict([('<STR_LIT:key>', key), ('<STR_LIT>', mode)]))<EOL>
modes:
    0 -> simple press
    1 -> long press
    2 -> release after long press