def send_keys(self, keys):
try:<EOL><INDENT>sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<EOL>sock.settimeout(self._timeout)<EOL>sock.connect((self._ip, self._port['<STR_LIT>']))<EOL>version_info = sock.recv(<NUM_LIT:15>)<EOL>sock.send(version_info)<EOL>sock.recv(<NUM_LIT:2>)<EOL>sock.send(bytes.fromhex('<STR_LIT>'))<EOL>sock.recv(<NUM_LIT:4>)<EOL>sock.recv(<NUM_LIT>)<EOL>for key in keys:<EOL><INDENT>if key in self._keys:<EOL><INDENT>sock.send(bytes.fromhex("<STR_LIT>" +<EOL>self._keys[key]))<EOL>sock.send(bytes.fromhex("<STR_LIT>" +<EOL>self._keys[key]))<EOL><DEDENT><DEDENT>sock.close()<EOL><DEDENT>except socket.error:<EOL><INDENT>raise<EOL><DEDENT>
Send keys to the device.