help with Keyboard library

hello, i'm rather new to arduino but not to programming, and i've been having some issues with my code.

The project im working on is making a fightpad (arcade cabinet board thing).

I determined that none of the hardware or my PC are at fault as when I move the joystick the TX light blinks.

here's the code

Code:

---



```
#include <Keyboard.h>

void setupcolor=#000000[/color] {
pinModecolor=#000000[/color];  // sets pin 8 to input up
pinModecolor=#000000[/color];  // sets pin 9 to input right
pinModecolor=#000000[/color]; // sets pin 10 to input down
pinModecolor=#000000[/color]; // sets pin 11 to input left
Keyboard.begincolor=#000000[/color];
}

void loopcolor=#000000[/color] {         
if (digitalReadcolor=#000000[/color] == 0)
  {
    Keyboard.writecolor=#000000[/color]; //up
  }
  else if (digitalReadcolor=#000000[/color] == 0){ 
    Keyboard.writecolor=#000000[/color]; //right
  }
  else if (digitalReadcolor=#000000[/color] == 0){ 
    Keyboard.writecolor=#000000[/color]; //down       
   
  }
  else if (digitalReadcolor=#000000[/color] == 0){
    Keyboard.writecolor=#000000[/color];  //left
    }           
}
```

|

thank you in advance

p.s. i'm using a Arduino Leonardo

So what's the problem?

It may be that the PC isn't responding because the .write() does a .press() immediately followed by a .release(). It might help to replace .write(x) with .press(x), a short delay, and .release(x).

Your key codes would be easier to read if you used the defined names: