def parse_keystring(keystr):
 if is_special_key(keystr):
  return [_parse_single_key(keystr)]
 else:
  return [_parse_single_key(char) for char in keystr]

def parse_keystring ( keystr ) : if is_special_key ( keystr ) : return [ _parse_single_key ( keystr ) ] else : return [ _parse_single_key ( char ) for char in keystr ]
parse a keystring like <ctrl-x> or xyz and return a keyinfo list .