def sendKeyPresses():
    quit = False
    keysPressed = []
    while (True and (quit == False)):
        nextEvent = str(pygame.event.wait())
        if ('KeyDown' in nextEvent):
            key = nextEvent.split(', ')[1].split(' ')[1]
            sendCommand(translateToHex(key))
            if (key == '27'):
                quit = True
                pygame.quit()
def sendKeyPresses():
    quit = False
    keysPressed = []
    while (True and (quit == False)):
        nextEvent = str(pygame.event.wait())
        if ('KeyDown' in nextEvent):
            key = nextEvent.split(', ')[1].split(' ')[1]
            sendCommand(translateToHex(key))
            if (key == '27'):
                quit = True
                pygame.quit()