 }
 
 void changeModifiers(uint8_t modifiers) {
-    keyReport.modifiers = modifiers | (spacePressed ? MODIFIER_LEFT_SHIFT : 0);
+    keyReport.modifiers = modifiers | (keyboardState.spacePressed ? MODIFIER_LEFT_SHIFT : 0);
     Keyboard.sendReport(&keyReport);
 }
 

void stgKeyDown(uint8_t key) {
    switch (key) {
        case STICK_DOWN_KEY:
            downPressed = true;
            Joystick.setYAxis(STICK_DOWN);

            return;

        case STICK_UP_KEY:
            upPressed = true;
            Joystick.setYAxis(STICK_UP);

            return;

        case STICK_LEFT_KEY:
            leftPressed = true;
            Joystick.setXAxis(STICK_LEFT);

            return;

        case STICK_RIGHT_KEY:
            rightPressed = true;
            Joystick.setXAxis(STICK_RIGHT);

            return;


#define KEY_COUNT 0xE8

#define MOUSE_MOVE_COEFFICIENT 4.0
#define MOUSE_SCROLL_DENOMINATOR 4

#define MODE_NEUTRAL 0
#define MODE_DUDRACK 1
