How to control led brightness with one keyboard button

You should check out PWM (pulse width modulation) for controlling the brightness of the LED. Have look at https://www.arduino.cc/en/Tutorial/Foundations/PWM
This also shows where to find examples within the Arduino IDE.

Also.. your case statement won't do what you want. The first 'a' check will be true.. and exit the switch statement (break). Next time through the same 'a' check will be true... etc.