Help me to use Keyboard.press while Fade led

i have start electric drum project and i want to fade led while use Keyboard.press other key.

if(analogRead(analogpin0)>threshold)
{
Serial.println("A0");
  Keyboard.press('w');
  delay(100);
  Keyboard.releaseAll();

      while( 1 )
      {
      analogWrite(led, brightness);
      brightness = brightness + fadeAmount;
       if (brightness == 0 || brightness == 255) {
          fadeAmount = -fadeAmount ;
        }
      delay(30);
      if ( brightness == 0 )
      break;
      }
  }

i have start electric drum project and i want to fade led while use Keyboard.press other key.

The while loop and delay() are blocking code. Nothing else can happen while that while loop is running.

That is NOT the correct way to do two things at the same time.

http://forum.arduino.cc/index.php?topic=363497.msg2505722#new

PaulS:
The while loop and delay() are blocking code. Nothing else can happen while that while loop is running.

That is NOT the correct way to do two things at the same time.

Prevenir que un Switch case se interrumpa antes de completar su funcion? - #8 by AlexLPD - Software - Arduino Forum

How to fix this? i'm newbie with coding.

How to fix this? i'm newbie with coding.

So, you read through that complete link in less than 8 minutes. And, you tried some of the stuff that it explains, and it didn't do what you wanted, so, without posting any new code, you want us to help you fix the code you didn't post. Ain't going to happen.