# Path: src/dp_controller.py
# class Button(enum.Enum):
# class Trigger(enum.Enum):
# class Stick(enum.Enum):
# class DolphinController:
#     A = 0
#     B = 1
#     X = 2
#     Y = 3
#     Z = 4
#     START = 5
#     L = 6
#     R = 7
#     D_UP = 8
#     D_DOWN = 9
#     D_LEFT = 10
#     D_RIGHT = 11
#     L = 0
#     R = 1
#     MAIN = 0
#     C = 1
#     def __init__(self, path):
#     def __enter__(self):
#     def __exit__(self, *args):
#     def press_button(self, button):
#     def release_button(self, button):
#     def press_release_button(self, button, delay):
#     def set_trigger(self, trigger, amount):
#     def set_stick(self, stick, x, y):
#     def reset(self):


import src.keylog as keylog
from src import dp_controller
                        self.convert_key(key, is_press=0)
                        self.previous_keys[key] = False

            # Check for MAIN STICK
            elif not keys[key]:
                if self.previous_keys[key]:
                    self.convert_key(key, is_press=0)
                    self.previous_keys[key] = False

            else:
                if not self.previous_keys[key]:
                    self.convert_key(key, is_press=1)
                    self.previous_keys[key] = True

    def convert_key(self, key, is_press):
        # TODO organize in general way such that an controller input can be sent to pipe only knowing the key
        key_pad = None
        if key == 'x':
            key_pad = dp_controller.Button.A
        elif key == 'z':
            key_pad = dp_controller.Button.B
        elif key == 'c':
            key_pad = dp_controller.Button.X
        elif key == 's':
            key_pad = dp_controller.Button.Y
        elif key == 'd':
            key_pad = dp_controller.Button.Z
        elif key == 'enter':
            key_pad = dp_controller.Button.START
        elif key == 'left' or key == 'right' or key == 'up' or key == 'down':

# Path: src/dp_controller.py
# class Button(enum.Enum):
# class Trigger(enum.Enum):
# class Stick(enum.Enum):
# class DolphinController:
#     A = 0
#     B = 1
#     X = 2
#     Y = 3
#     Z = 4
#     START = 5
#     L = 6
#     R = 7
#     D_UP = 8
#     D_DOWN = 9
#     D_LEFT = 10
#     D_RIGHT = 11
#     L = 0
#     R = 1
#     MAIN = 0
#     C = 1
#     def __init__(self, path):
#     def __enter__(self):
#     def __exit__(self, *args):
#     def press_button(self, button):
#     def release_button(self, button):
#     def press_release_button(self, button, delay):
#     def set_trigger(self, trigger, amount):
#     def set_stick(self, stick, x, y):
#     def reset(self):


# Path: src/key2pad.py
import src.keylog as keylog
from src import dp_controller

                        self.convert_key(key, is_press=0)
                        self.previous_keys[key] = False

            # Check for MAIN STICK
            elif not keys[key]:
                if self.previous_keys[key]:
                    self.convert_key(key, is_press=0)
                    self.previous_keys[key] = False

            else:
                if not self.previous_keys[key]:
                    self.convert_key(key, is_press=1)
                    self.previous_keys[key] = True

    def convert_key(self, key, is_press):
        # TODO organize in general way such that an controller input can be sent to pipe only knowing the key
        key_pad = None
        if key == 'x':
            key_pad = dp_controller.Button.A
        elif key == 'z':
            key_pad = dp_controller.Button.B
        elif key == 'c':
            key_pad = dp_controller.Button.X
        elif key == 's':
            key_pad = dp_controller.Button.Y
        elif key == 'd':
            key_pad = dp_controller.Button.Z
        elif key == 'enter':
            key_pad = dp_controller.Button.START
        elif key == 'left' or key == 'right' or key == 'up' or key == 'down':

            key_pad = dp_controller.Stick.MAIN