def handle_keyboard_input(self):
        """Handle pressed state of keys from keyboard."""
        key_input = SERVICES_NS.get_pressed_keys()

        up = any(key_input[item] for item in UP_KEYS)
        left = any(key_input[item] for item in LEFT_KEYS)
        down = any(key_input[item] for item in DOWN_KEYS)
        right = any(key_input[item] for item in RIGHT_KEYS)

        if up and not down:

            self.go_up()
            self.draw_once()

        elif down and not up:

            self.go_down()
            self.draw_once()

        if left and not right:

            self.go_left()
            self.draw_once()

        elif right and not left:

            self.go_right()
            self.draw_once()
Handle pressed state of keys from keyboard.
nodezator/htsl/main.py